Browse Source

Fix server attribute not being set in GUILD_MEMBER_ADD.

pull/8/head v0.6.2
Rapptz 10 years ago
parent
commit
94e6b4a8ef
  1. 4
      discord/__init__.py
  2. 2
      discord/client.py

4
discord/__init__.py

@ -15,8 +15,8 @@ __title__ = 'discord'
__author__ = 'Rapptz'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Rapptz'
__version__ = '0.6.1'
__build__ = 0x006010
__version__ = '0.6.2'
__build__ = 0x006020
from .client import Client
from .user import User

2
discord/client.py

@ -325,7 +325,7 @@ class Client(object):
self._invoke_event('on_channel_create', channel)
elif event == 'GUILD_MEMBER_ADD':
server = self._get_server(data.get('guild_id'))
member = Member(deaf=False, mute=False, **data)
member = Member(server=server, deaf=False, mute=False, **data)
server.members.append(member)
self._invoke_event('on_member_join', member)
elif event == 'GUILD_MEMBER_REMOVE':

Loading…
Cancel
Save