aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Forbes <[email protected]>2018-08-25 14:44:10 -0500
committerRapptz <[email protected]>2018-08-28 23:50:54 -0400
commitb3bfec91196b2cb51abb8ec20534979976a53daf (patch)
tree37f059bea221bbaf6236727f9d348e8e2df0d3cc
parentFinished index.po translation. (diff)
downloaddiscord.py-b3bfec91196b2cb51abb8ec20534979976a53daf.tar.xz
discord.py-b3bfec91196b2cb51abb8ec20534979976a53daf.zip
Fix CallMessage.duration calculation
-rw-r--r--discord/calls.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/calls.py b/discord/calls.py
index 44b8f4db..1c35d5ef 100644
--- a/discord/calls.py
+++ b/discord/calls.py
@@ -74,9 +74,9 @@ class CallMessage:
The timedelta object representing the duration.
"""
if self.ended_timestamp is None:
- return datetime.datetime.utcnow() - self.message.timestamp
+ return datetime.datetime.utcnow() - self.message.created_at
else:
- return self.ended_timestamp - self.message.timestamp
+ return self.ended_timestamp - self.message.created_at
class GroupCall:
"""Represents the actual group call from Discord.