bot.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:tuxbot-bot 作者: outout14 项目源码 文件源码
def on_command_error(self, ctx, error):
    if isinstance(error, commands.NoPrivateMessage):
        await ctx.author.send('Cette commande ne peut pas être utilisée en message privée.')
    elif isinstance(error, commands.DisabledCommand):
        await ctx.author.send('Désoler mais cette commande est désactivé, elle ne peut donc pas être utilisée.')
    elif isinstance(error, commands.CommandInvokeError):
        print(f'In {ctx.command.qualified_name}:', file=sys.stderr)
        traceback.print_tb(error.original.__traceback__)
        print(f'{error.original.__class__.__name__}: {error.original}', file=sys.stderr)

## LOAD ##
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号