我想要一个代码,可以显示某人在语音频道中的完整时间,但我不知道如何开始和停止计时器。
@bot.event
async def on_voice_state_update(before, after):
if after.voice.voice_channel:
timestrr = time.strftime("%d.%m.%Y-%H:%M:%S")
voicezeit(after.id, timestrr)
#here should a timer start
else:
#and here should the timer stop
time.time()
记录 A 点和 B 点的时间? - tonypdmtr