diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index 81184e4b1..e39e30349 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -108,7 +108,7 @@ class CooldownMapping: if bucket_type is BucketType.user: return msg.author.id elif bucket_type is BucketType.guild: - return getattr(msg.guild, 'id', msg.author.id) + return (msg.guild or msg.author).id elif bucket_type is BucketType.channel: return msg.channel.id