Add Role.server attribute.

This breaks events that expected a server parameter for the role events.
This commit is contained in:
Rapptz
2016-06-01 19:27:48 -04:00
parent 8638ff4414
commit 5016f12079
5 changed files with 14 additions and 15 deletions

View File

@ -2447,8 +2447,7 @@ class Client:
yield from utils._verify_successful_response(r)
data = yield from r.json(encoding='utf-8')
everyone = server.id == data.get('id')
role = Role(everyone=everyone, **data)
role = Role(server=server, **data)
# we have to call edit because you can't pass a payload to the
# http request currently.