Remove int() support
This commit is contained in:
parent
b9642f785e
commit
4010f09052
@ -206,9 +206,6 @@ class GuildChannel:
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
@property
|
||||
def _sorting_bucket(self):
|
||||
raise NotImplementedError
|
||||
|
@ -112,9 +112,6 @@ class Emoji(_EmojiTag):
|
||||
return '<a:{0.name}:{0.id}>'.format(self)
|
||||
return "<:{0.name}:{0.id}>".format(self)
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
def __repr__(self):
|
||||
return '<Emoji id={0.id} name={0.name!r} animated={0.animated} managed={0.managed}>'.format(self)
|
||||
|
||||
|
@ -207,9 +207,6 @@ class Guild(Hashable):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
def __repr__(self):
|
||||
attrs = (
|
||||
'id', 'name', 'shard_id', 'chunked'
|
||||
|
@ -84,9 +84,6 @@ class Attachment:
|
||||
""":class:`bool`: Whether this attachment contains a spoiler."""
|
||||
return self.filename.startswith('SPOILER_')
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
def __repr__(self):
|
||||
return '<Attachment id={0.id} filename={0.filename!r} url={0.url!r}>'.format(self)
|
||||
|
||||
@ -391,9 +388,6 @@ class Message:
|
||||
def __str__(self):
|
||||
return self.content
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
def __repr__(self):
|
||||
return '<Message id={0.id} channel={0.channel!r} type={0.type!r} author={0.author!r} flags={0.flags!r}>'.format(self)
|
||||
|
||||
|
@ -99,9 +99,6 @@ class Role(Hashable):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
def __repr__(self):
|
||||
return '<Role id={0.id} name={0.name!r}>'.format(self)
|
||||
|
||||
|
@ -92,9 +92,6 @@ class BaseUser(_BaseUser):
|
||||
def __str__(self):
|
||||
return '{0.name}#{0.discriminator}'.format(self)
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
def __eq__(self, other):
|
||||
return isinstance(other, _BaseUser) and other.id == self.id
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user