aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Amrou Bellalouna <[email protected]>2022-09-16 17:04:49 +0100
committerGravatar Amrou Bellalouna <[email protected]>2022-09-16 17:04:49 +0100
commit3dbb53fd11cf688289d6294210dbca3eef70a538 (patch)
tree01383f16b29da4c0e8e82dec5519995ac903f0b6
parentMerge remote-tracking branch 'origin/2108-invoke-rule-command-with-keywords' ... (diff)
use the cached channels instead of fetching them with each command execution
-rw-r--r--bot/exts/info/information.py6
1 files 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)