mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 17:06:21 +00:00
Rename Server to Guild everywhere.
This commit is contained in:
@ -31,7 +31,7 @@ __all__ = ['BucketType', 'Cooldown', 'CooldownMapping']
|
||||
class BucketType(enum.Enum):
|
||||
default = 0
|
||||
user = 1
|
||||
server = 2
|
||||
guild = 2
|
||||
channel = 3
|
||||
|
||||
class Cooldown:
|
||||
@ -97,8 +97,8 @@ class CooldownMapping:
|
||||
bucket_type = self._cooldown.type
|
||||
if bucket_type is BucketType.user:
|
||||
return msg.author.id
|
||||
elif bucket_type is BucketType.server:
|
||||
return getattr(msg.server, 'id', msg.author.id)
|
||||
elif bucket_type is BucketType.guild:
|
||||
return getattr(msg.guild, 'id', msg.author.id)
|
||||
elif bucket_type is BucketType.channel:
|
||||
return msg.channel.id
|
||||
|
||||
|
Reference in New Issue
Block a user