aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Delevoryas <[email protected]>2021-02-06 02:42:22 -0800
committerGitHub <[email protected]>2021-02-06 05:42:22 -0500
commitaf6725694916c14187270d6dbc84a8fd8661a8bc (patch)
tree7b242f4565e635128137d1873ec881782814a640
parentSome grammar nits (diff)
downloaddiscord.py-af6725694916c14187270d6dbc84a8fd8661a8bc.tar.xz
discord.py-af6725694916c14187270d6dbc84a8fd8661a8bc.zip
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.
-rw-r--r--discord/message.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/discord/message.py b/discord/message.py
index d024c4b3..7df7f6c9 100644
--- a/discord/message.py
+++ b/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']