【发布时间】:2021-04-09 04:37:57
【问题描述】:
我正在使用 python 制作一个不和谐的机器人,它将每隔几秒发送一次特定的消息。所以它不会弄乱通道,我希望它删除它在 while 循环开始时最后发送的消息,用新消息替换消息。
我不知道该怎么做,任何帮助将不胜感激:)
@bot.command()
async def start(ctx):
await ctx.send("Bot Started.")
global bot_status
bot_status = "running"
while bot_status == "running":
if bot_status == "stopped":
break
time.sleep(10)
#delete
#delete
#delete
await ctx.send("test")
await ctx.send("test")
await ctx.send("test")
【问题讨论】:
标签: python discord discord.py