I want to make a chronometer with Discord.py. I started writing the script but I have problems with result
I want to determine the time (in hours) between two commands. But with datetime, the strftime doesn't work.
@bot.command()
async def jeu(ctx):
channel = ctx.channel
now = datetime.now()
await ctx.send(f'Bon jeu !')
def check(m):
return m.content == '.deco' and m.channel == channel
msg = await bot.wait_for('message', check=check)
if msg:
then = datetime.now()
delta = now - then
await ctx.send(f'Temps écoulé : {delta}')
(PS : I'm French so sry for my bad english x))