aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-04-21 15:48:35 +0200
committerGravatar GitHub <[email protected]>2020-04-21 15:48:35 +0200
commit25c93b7e0d01aa4f96399c4271f91bf3b82f8fbe (patch)
tree64f8e71254fcd9caabc17fd2f01b0c64d86b4bed
parentMerge pull request #896 from python-discord/answered-session-stats (diff)
parentFix category cache issue (diff)
Merge pull request #900 from python-discord/fix-category-cache-issue
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