Browse Source

Fix CallMessage.duration calculation

pull/1546/merge
Bryan Forbes 7 years ago
committed by Rapptz
parent
commit
b3bfec9119
  1. 4
      discord/calls.py

4
discord/calls.py

@ -74,9 +74,9 @@ class CallMessage:
The timedelta object representing the duration. The timedelta object representing the duration.
""" """
if self.ended_timestamp is None: if self.ended_timestamp is None:
return datetime.datetime.utcnow() - self.message.timestamp return datetime.datetime.utcnow() - self.message.created_at
else: else:
return self.ended_timestamp - self.message.timestamp return self.ended_timestamp - self.message.created_at
class GroupCall: class GroupCall:
"""Represents the actual group call from Discord. """Represents the actual group call from Discord.

Loading…
Cancel
Save