日期时间没有前导零
Datetime no leading zero
尝试了几种方法但似乎不起作用
time = datetime.datetime.utcnow()
time.strftime("%H:%M")
await
client.get_channel(timechannel).edit(name=f"{time.hour}:{time.minute} UTC")
试试这个:
time = datetime.datetime.utcnow()
await client.get_channel(timechannel).edit(name=time.strftime('%H:%M UTC'))
尝试了几种方法但似乎不起作用
time = datetime.datetime.utcnow()
time.strftime("%H:%M")
await
client.get_channel(timechannel).edit(name=f"{time.hour}:{time.minute} UTC")
试试这个:
time = datetime.datetime.utcnow()
await client.get_channel(timechannel).edit(name=time.strftime('%H:%M UTC'))