Bladeren bron

Fixing ping

Penta 1 maand geleden
bovenliggende
commit
e608578fb4
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      myanimebot/commands.py

+ 1 - 1
myanimebot/commands.py

@@ -220,7 +220,7 @@ async def info_cmd(message, words):
 async def ping_cmd(message, channel):
     ''' Responds to ping command '''
     messageTimestamp = message.created_at
-    currentTimestamp = datetime.datetime.utcnow()
+    currentTimestamp = datetime.datetime.now(datetime.timezone.utc)
     delta = round((currentTimestamp - messageTimestamp).total_seconds() * 1000)
 
     await message.reply("pong ({}ms)".format(delta))