From 3dbb53fd11cf688289d6294210dbca3eef70a538 Mon Sep 17 00:00:00 2001 From: Amrou Bellalouna Date: Fri, 16 Sep 2022 17:04:49 +0100 Subject: use the cached channels instead of fetching them with each command execution --- bot/exts/info/information.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py index 5f996508f..67515bc57 100644 --- a/bot/exts/info/information.py +++ b/bot/exts/info/information.py @@ -19,7 +19,7 @@ from bot.errors import NonExistentRoleError from bot.log import get_logger from bot.pagination import LinePaginator from bot.utils import time -from bot.utils.channel import get_or_fetch_channel, is_mod_channel, is_staff_channel +from bot.utils.channel import is_mod_channel, is_staff_channel from bot.utils.checks import cooldown_with_role_bypass, has_no_roles_check, in_whitelist_check from bot.utils.members import get_or_fetch_member @@ -580,12 +580,10 @@ class Information(Cog): if not rules and not final_rules: # This would mean that only keywords where used and no match for them was found - dev_contrib_channel = await get_or_fetch_channel(constants.Channels.dev_contrib) - meta_channel = await get_or_fetch_channel(constants.Channels.meta) await ctx.send( f"There are currently no rules that correspond to keywords: **{', '.join(keywords)}**.\n" f"If you think it should be added, please suggest it in either " - f"{meta_channel.mention} or {dev_contrib_channel.mention}") + f"<#{constants.Channels.meta}> or <#{constants.Channels.dev_contrib}>") return await LinePaginator.paginate(final_rules, ctx, rules_embed, max_lines=3) -- cgit v1.2.3