mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +02:00
Change id to not cast to int and fail if id is not included on UserConnection constructor
This commit is contained in:
@@ -80,7 +80,7 @@ class UserConnection(object):
|
||||
|
||||
def __init__(self, payload):
|
||||
self._payload = payload
|
||||
self.id = int(self._payload.get("id", 0))
|
||||
self.id = self._payload["id"]
|
||||
self.name = self._payload.get("name")
|
||||
self.type = self._payload.get("type")
|
||||
self.revoked = self._payload.get("revoked")
|
||||
|
||||
Reference in New Issue
Block a user