【发布时间】:2020-08-24 22:22:00
【问题描述】:
我怎样才能使存在循环?我希望它每 5-10 秒改变一次状态。
client = commands.Bot(command_prefix=commands.when_mentioned_or(","))
async def presenced():
presences = ["Prefix: ,", "Over people!"]
activity = discord.Activity(
name=random.choice(presences), type=discord.ActivityType.watching)
await client.change_presence(activity=activity)
client.loop.create_task(presenced())
【问题讨论】: