diff options
| -rw-r--r-- | discord/ext/commands/cooldowns.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index 81184e4b..e39e3034 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 |