Browse Source

Ensure Message.call is None by default

`Message` has an attribute `call` which is claimed to have type
`Optional[CallMessage]`. 

But `Message` doesn't actually ensure that `call` is initialized to a value in
`__init__`. This commit fixes that inconsistency.
pull/6396/head
Peter Delevoryas 4 years ago
committed by GitHub
parent
commit
af67256949
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      discord/message.py

1
discord/message.py

@ -504,6 +504,7 @@ class Message(Hashable):
self.application = data.get('application')
self.activity = data.get('activity')
self.channel = channel
self.call = None
self._edited_timestamp = utils.parse_time(data['edited_timestamp'])
self.type = try_enum(MessageType, data['type'])
self.pinned = data['pinned']

Loading…
Cancel
Save