commands.py 文件源码

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

项目:memes-reposter 作者: vaniakosmos 项目源码 文件源码
def distribute(self, bot: Bot, update: Update, args):
        if args.help:
            self.send_code(update, args.help)

        elif args.command == 'add':
            usage = self.subparsers['add'].format_usage()
            self.add(bot, update, args.tags, usage)

        elif args.command in ['remove', 'delete']:
            usage = self.subparsers['remove'].format_usage()
            self.remove(bot, update, args.tags, usage)

        elif args.command == 'show':
            self.show(bot, update)

        else:
            self.logger.error('Bad args: ' + str(args))
            raise Exception  # will never get this far (hopefully)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号