所以,如果我有一个很长的命令,像这样:@bot.command(pass_context=True)async def longCommand(ctx): #typing status sleep(10) bot.say("Done!")不幸的是,在文档中或此处未找到任何内容。
3 回答

MMTTMM
TA贡献1869条经验 获得超4个赞
如果使用rewrite分支,则所有都Messageable具有一个typing允许您无限期键入的上下文管理器和一个trigger_typing可在几秒钟内显示键入消息的协程。
@bot.command()
async def longCommand(ctx):
async with ctx.typing():
await sleep(10)
await ctx.send("Done!")
添加回答
举报
0/150
提交
取消