diff options
| author | Khazhismel <[email protected]> | 2015-12-23 17:38:59 -0500 |
|---|---|---|
| committer | Khazhismel <[email protected]> | 2015-12-23 21:28:18 -0500 |
| commit | 0aa46e6def0af17973e00887b2aae116c84afb39 (patch) | |
| tree | b3df0ee711957e59ac508fdb3210d130ac7b4cd8 /discord/server.py | |
| parent | Mentions are now <@id> *only* - remove mentions array on send and edit message (diff) | |
| download | discord.py-0aa46e6def0af17973e00887b2aae116c84afb39.tar.xz discord.py-0aa46e6def0af17973e00887b2aae116c84afb39.zip | |
Add game data class, replace game_id.
Diffstat (limited to 'discord/server.py')
| -rw-r--r-- | discord/server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/server.py b/discord/server.py index 566510e5..cb3d9237 100644 --- a/discord/server.py +++ b/discord/server.py @@ -27,6 +27,7 @@ DEALINGS IN THE SOFTWARE. from . import utils from .role import Role from .member import Member +from .game import Game from .channel import Channel from .enums import ServerRegion, Status from .mixins import Hashable @@ -143,7 +144,8 @@ class Server(Hashable): member.status = Status(member.status) except: pass - member.game_id = presence['game_id'] + game = presence.get('game') + member.game = game and Game(**game) if 'channels' in guild: channels = guild['channels'] @@ -171,4 +173,3 @@ class Server(Hashable): if self.icon is None: return '' return 'https://cdn.discordapp.com/icons/{0.id}/{0.icon}.jpg'.format(self) - |