aboutsummaryrefslogtreecommitdiff
path: root/discord/user.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-10-10 20:09:06 -0400
committerRapptz <[email protected]>2017-01-03 09:51:49 -0500
commit45c729b167509deb5e389a7812d0ae8f4cbc4e72 (patch)
tree5617af109edb3d7b7fb0e28934bf57e4f664f362 /discord/user.py
parentRemove Message.timestamp and make Message.channel_mentions lazy. (diff)
downloaddiscord.py-45c729b167509deb5e389a7812d0ae8f4cbc4e72.tar.xz
discord.py-45c729b167509deb5e389a7812d0ae8f4cbc4e72.zip
Switch IDs to use int instead of str
Diffstat (limited to 'discord/user.py')
-rw-r--r--discord/user.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/discord/user.py b/discord/user.py
index 919d6deb..fa361837 100644
--- a/discord/user.py
+++ b/discord/user.py
@@ -46,15 +46,15 @@ class User:
Attributes
-----------
- name : str
+ name: str
The user's username.
- id : str
+ id: int
The user's unique ID.
- discriminator : str or int
+ discriminator: str
The user's discriminator. This is given when the username has conflicts.
- avatar : str
+ avatar: str
The avatar hash the user has. Could be None.
- bot : bool
+ bot: bool
Specifies if the user is a bot account.
"""
@@ -63,7 +63,7 @@ class User:
def __init__(self, *, state, data):
self._state = state
self.name = data['username']
- self.id = data['id']
+ self.id = int(data['id'])
self.discriminator = data['discriminator']
self.avatar = data['avatar']
self.bot = data.get('bot', False)