【发布时间】:2022-07-12 02:34:10
【问题描述】:
spam_id = xxxxxx
@tasks.loop(秒=0.2) 异步 def 垃圾邮件发送者(ctx): text_channel = client.get_channel(spam_id)
如果 text_channel != 无:
num = random.randint(1,2)
await text_channel.send(num)
intervals = [1.0, 1.1, 1.2, 1.3, 1.4]
await asyncio.sleep(random.choice(intervals))
【问题讨论】:
-
我想发出一个命令,这样我就可以通过在 discord 上发出命令来更改 spam_id
标签: discord.py