From b3bfec91196b2cb51abb8ec20534979976a53daf Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Sat, 25 Aug 2018 14:44:10 -0500 Subject: [PATCH] Fix CallMessage.duration calculation --- discord/calls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/calls.py b/discord/calls.py index 44b8f4db5..1c35d5ef6 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.