【发布时间】:2019-08-07 08:26:38
【问题描述】:
我有下面的代码,正在尝试每 60 秒向不和谐频道发送消息。登录成功,但频道上没有任何反应。
async def my_background_task():
await client.wait_until_ready()
counter = 0
channel = discord.Object(id='608412706310979613')
while not client.is_closed:
counter += 1
await channel.send(counter)
await client.send_message(channel, counter)
await asyncio.sleep(60) # task runs every 60 seconds
我希望在指定通道上每 60 秒接收一次递增计数
【问题讨论】:
标签: python-3.x discord.py