【发布时间】:2021-04-24 19:52:36
【问题描述】:
如何防止我的不和谐机器人中的第一个循环在开始触发后立即触发?循环应该每 30 分钟发生一次,我不希望它在机器人启动时触发。
from discord.ext import tasks
@tasks.loop(minutes=30)
async def hunger():
#Doesn't really matter what is here..
@hunger.before_loop
async def before():
await client.wait_until_ready()
hunger.start()
client.run('xxx')
【问题讨论】:
标签: python python-3.x loops discord.py task