manager.py 文件源码

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

项目:SP-admin-server 作者: VenomzGaming 项目源码 文件源码
def add_command(self, command, permission):
        if command in self:
            raise CommandException('Cannot re-assign command ({command_name})'.format(command_name=command))

        def decorator(method):
            ## Retrieves the functions argument count.
            ## Used to verify the client/say command is valid.
            self[command] = (
                method,
                len(signature(method).parameters),
                permission
            )
            def new(*args):
                method(*args)
            return new
        return decorator
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号