aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joseph Banks <[email protected]>2020-04-21 14:12:48 +0100
committerGravatar Joseph Banks <[email protected]>2020-04-21 14:12:48 +0100
commited80b91c36bfa397634a64f7881655454fc9557f (patch)
tree64f8e71254fcd9caabc17fd2f01b0c64d86b4bed
parentMerge pull request #896 from python-discord/answered-session-stats (diff)
Fix category cache issue
-rw-r--r--bot/cogs/help_channels.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 9d7328739..a61f30deb 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -276,13 +276,12 @@ class HelpChannels(Scheduler, commands.Cog):
return name
- @staticmethod
- def get_category_channels(category: discord.CategoryChannel) -> t.Iterable[discord.TextChannel]:
+ def get_category_channels(self, category: discord.CategoryChannel) -> t.Iterable[discord.TextChannel]:
"""Yield the text channels of the `category` in an unsorted manner."""
log.trace(f"Getting text channels in the category '{category}' ({category.id}).")
# This is faster than using category.channels because the latter sorts them.
- for channel in category.guild.channels:
+ for channel in self.bot.get_guild(constants.Guild.id).channels:
if channel.category_id == category.id and isinstance(channel, discord.TextChannel):
yield channel