第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何獲取所有 on_command_error 錯(cuò)誤事件的列表

如何獲取所有 on_command_error 錯(cuò)誤事件的列表

動(dòng)漫人物 2024-01-24 15:23:20
我試圖為每種錯(cuò)誤類型創(chuàng)建專門的錯(cuò)誤,但我只能找到下面使用的 2 個(gè)錯(cuò)誤。有誰知道命令中的所有錯(cuò)誤事件類型@client.eventasync def on_command_error(ctx, error):    if isinstance(error, commands.CommandOnCooldown):        await ctx.message.delete()        embed = discord.Embed(title="Slow Down!! :timer:", description='This command can be used again in %.2f seconds' % error.retry_after, color=0xE74C3C)        message = await ctx.message.channel.send(embed=embed, delete_after=10)        await asyncio.sleep(5)        await message.delete()    elif isinstance(error, commands.CommandNotFound):        await ctx.message.delete()        embed = discord.Embed(title="Uh oh!", description=f"Uh oh, {ctx.author.mention} what are you trying to do?? {error}!", color=0xE74C3C)        message = await ctx.message.channel.send(embed=embed, delete_after=10)        await asyncio.sleep(2)commandNotFound 和 CommandOnCooldown 是我能找到并工作的唯一類型,有人知道所有類型的列表嗎?我目前使用 on_command_error 但它不會(huì)具體向用戶解決問題是什么。謝謝,非常感謝
查看完整描述

1 回答

?
慕村225694

TA貢獻(xiàn)1880條經(jīng)驗(yàn) 獲得超4個(gè)贊

通過一些研究,您可以輕松地從 API 參考中找到所有錯(cuò)誤。是所有命令錯(cuò)誤異常。



查看完整回答
反對(duì) 回復(fù) 2024-01-24
  • 1 回答
  • 0 關(guān)注
  • 126 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)