We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d493df commit 5a5511aCopy full SHA for 5a5511a
discord/ext/commands/cooldowns.py
@@ -70,7 +70,11 @@ def get_key(self, msg: Message) -> Any:
70
elif self is BucketType.member:
71
return (msg.guild and msg.guild.id), msg.author.id
72
elif self is BucketType.category:
73
- return (msg.channel.category if isinstance(msg.channel, discord.abc.GuildChannel) else msg.channel).id
+ return (
74
+ msg.channel.category
75
+ if isinstance(msg.channel, discord.abc.GuildChannel)
76
+ else msg.channel
77
+ ).id
78
elif self is BucketType.role:
79
# we return the channel id of a private-channel as there are only roles in guilds
80
# and that yields the same result as for a guild with only the @everyone role
0 commit comments