コード例 #1
0
ファイル: commands.py プロジェクト: matpow2/cuwo
def help(script, name=None):
    """Returns information about commands."""
    if name is None:
        commands = sorted([item.name for item in script.get_commands()])
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()
コード例 #2
0
ファイル: commands.py プロジェクト: BangL/cuwo
def help(script, name=None):
    if name is None:
        commands = [item.name for item in script.get_commands()]
        commands.sort()
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()
コード例 #3
0
ファイル: commands.py プロジェクト: Endimmion/cuwo
def help(script, name=None):
    """Returns information about commands."""
    if name is None:
        commands = sorted([item.name for item in script.get_commands()])
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()
コード例 #4
0
ファイル: commands.py プロジェクト: BangL/cuwo
def help(script, name=None):
    if name is None:
        commands = [item.name for item in script.get_commands()]
        commands.sort()
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()