Skip to content

Commit 8d78a73

Browse files
RevnoplexDorukyum
andauthored
Update discord/ext/commands/cooldowns.py
Co-authored-by: Dorukyum <[email protected]> Signed-off-by: Revnoplex <[email protected]>
1 parent e78de73 commit 8d78a73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord/ext/commands/cooldowns.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ def get_key(self, msg: Message) -> Any:
7171
return (msg.guild and msg.guild.id), msg.author.id
7272
elif self is BucketType.category:
7373
return (
74-
msg.channel.category
74+
msg.channel.category.id
7575
if isinstance(msg.channel, discord.abc.GuildChannel)
76-
else msg.channel
77-
).id
76+
else msg.channel.id
77+
)
7878
elif self is BucketType.role:
7979
# we return the channel id of a private-channel as there are only roles in guilds
8080
# and that yields the same result as for a guild with only the @everyone role

0 commit comments

Comments
 (0)