This commit is contained in:
Amazed 2020-09-01 16:16:46 +02:00
parent d374bc8a9a
commit 3afaad143b

View File

@ -304,7 +304,7 @@ class WynncraftCog(commands.Cog):
for almost_online_player in almost_online_players: for almost_online_player in almost_online_players:
last_join_dt_utc = datetime.strptime(almost_online_player["data"][0]["meta"]["lastJoin"], "%Y-%m-%dT%H:%M:%S.%fZ") last_join_dt_utc = datetime.strptime(almost_online_player["data"][0]["meta"]["lastJoin"], "%Y-%m-%dT%H:%M:%S.%fZ")
last_join_dt_local = utc_to_local(last_join_dt_utc) last_join_dt_local = utc_to_local(last_join_dt_utc)
mins = (datetime.now() - last_join_dt_local).total_seconds() // 60 mins = (datetime.now(last_join_dt_local.tzinfo) - last_join_dt_local).total_seconds() // 60
s = ":grey_question: **%s** était connecté il y a %s minutes" % (almost_online_player["data"][0]["username"], mins) s = ":grey_question: **%s** était connecté il y a %s minutes" % (almost_online_player["data"][0]["username"], mins)
full_text += s + "\n" full_text += s + "\n"
if not online_players and not almost_online_players: if not online_players and not almost_online_players: