diff options
author | 2020-04-21 14:12:48 +0100 | |
---|---|---|
committer | 2020-04-21 14:12:48 +0100 | |
commit | ed80b91c36bfa397634a64f7881655454fc9557f (patch) | |
tree | 64f8e71254fcd9caabc17fd2f01b0c64d86b4bed | |
parent | Merge pull request #896 from python-discord/answered-session-stats (diff) |
Fix category cache issue
-rw-r--r-- | bot/cogs/help_channels.py | 5 |
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 |