我正在使用重写制作一个不和谐的机器人,但是当我的命令运行时,它会发送两次消息 100% 没有其他调用来发送该消息,而且它只是第一条消息(等等,我正在收集数据),即发送两次。这是命令的代码:
@bot.command()
async def testcmd(ctx):
print("called")
msgtemp = await ctx.message.channel.send("Hold on, I'm gathering the data")
print("sent")
time.sleep(3)
await msgtemp.delete()
with open("fileofthings.txt") as fl:
await ctx.send(fl.read())
Run Code Online (Sandbox Code Playgroud)