コード例 #1
0
    def __init__(self):
        super().__init__()

        self.name = "About command"
        self.aliases = [".about"]
        self.description = "Shows information about project"
        self.usage = ".about"
        self.permission = "info.about"

        self.syntax = SyntaxBuilder() \
            .set_action("about") \
            .build()
コード例 #2
0
    def __init__(self):
        super().__init__()

        self.name = "Move Terminal Here"
        self.aliases = [".here", ".h"]
        self.description = "Moves selected terminal below the user message"
        self.usage = ".here"
        self.permission = "session.move"

        self.syntax = SyntaxBuilder()\
            .set_action("move")\
        .build()
コード例 #3
0
    def __init__(self):
        super().__init__()

        self.name = "Select terminal"
        self.aliases = [".select", ".s"]
        self.description = "Sets terminal as selected"
        self.usage = ".select [name]"
        self.permission = "session.select"

        self.syntax = SyntaxBuilder()\
            .param("name", "select")\
        .build()
コード例 #4
0
    def __init__(self):
        super().__init__()

        self.name = "Rename terminal"
        self.aliases = [".rename"]
        self.description = "Renames terminal session"
        self.usage = ".rename <new_name>"
        self.permission = "session.rename"

        self.syntax = SyntaxBuilder() \
            .param("new_name", "rename") \
        .build()
コード例 #5
0
    def __init__(self):
        super().__init__()

        self.name = "Close terminal"
        self.aliases = [".close", ".c"]
        self.description = "Closes terminal session"
        self.usage = ".close [name]"
        self.permission = "session.close"

        self.syntax = SyntaxBuilder() \
            .set_action("close") \
            .param("name", "close") \
            .build()
コード例 #6
0
ファイル: open_command.py プロジェクト: zedansk/BashBot
    def __init__(self):
        super().__init__()

        self.name = "Opens Session"
        self.aliases = [".open", ".o"]
        self.description = "Opens new terminal session"
        self.usage = ".open [name]"
        self.permission = "session.open"

        self.syntax = SyntaxBuilder() \
            .set_action("open") \
            .param("name", "open") \
        .build()
コード例 #7
0
ファイル: repeat_command.py プロジェクト: zedansk/BashBot
    def __init__(self):
        super().__init__()

        self.name = "Repeat input"
        self.aliases = [".repeat", ".r"]
        self.description = "Repeats string n times ands sends to current terminal"
        self.usage = ".repeat <n> <string..>"
        self.permission = "input.repeat"

        self.syntax = SyntaxBuilder()\
            .param("times")\
            .param("text", "repeat", multiple=True)\
        .build()
コード例 #8
0
ファイル: permission_command.py プロジェクト: zedansk/BashBot
    def __init__(self):
        super().__init__()

        self.name = "Manage permissions"
        self.aliases = [".permission", ".p", ".permissions"]
        self.description = "Manage permissions"
        self.usage = ".permission <user> <permission_name> [new_value]\n\n**Example:**\n.permission @Adikso channels.#general.info_about false"
        self.permission = "permissions.manage"

        self.syntax = SyntaxBuilder()\
            .param("username", "show")\
            .param("permission_name", "verify")\
            .param("new_value", "set")\
        .build()
コード例 #9
0
ファイル: help_command.py プロジェクト: zedansk/BashBot
    def __init__(self):
        super().__init__()

        self.name = "Help command"
        self.aliases = [".help"]
        self.description = "Shows help"
        self.usage = ".help [name]"
        self.allowed_private = True
        self.permission = "info.help"

        self.syntax = SyntaxBuilder() \
            .set_action("show_help") \
            .param("command_name", "show_help") \
        .build()
コード例 #10
0
ファイル: sessions_command.py プロジェクト: zedansk/BashBot
    def __init__(self):
        super().__init__()

        self.name = "Sessions list"
        self.aliases = [".sessions", ".session"]
        self.description = "Manages sessions"
        self.usage = ".sessions\n.sessions kill <name>\n.sessions killall"
        self.permission = "session.list"

        self.syntax = SyntaxBuilder() \
            .set_action("list") \
            .action("killall", "killall") \
            .parent() \
            .node("kill") \
            .param("name", "kill") \
        .build()
コード例 #11
0
ファイル: settings_command.py プロジェクト: zedansk/BashBot
    def __init__(self):
        super().__init__()

        self.name = "Manage settings"
        self.aliases = [".settings", ".setting"]
        self.description = "Get/Set bot settings"
        self.usage = ".settings <name> [value]\n.settings save"
        self.permission = "internal.settings"

        self.syntax = SyntaxBuilder()\
            .set_action("all") \
            .action("save", "save") \
            .parent()\
                .param("name", "get") \
                .param("value", "set") \
        .build()
コード例 #12
0
    def __init__(self):
        super().__init__()

        self.name = "Manage Controls"
        self.aliases = [".controls"]
        self.description = "Manages terminal controls"
        self.usage = ".controls add/remove [emoji] [content..]"
        self.permission = "input.controls.manage"

        self.syntax = SyntaxBuilder() \
            .set_action("show") \
            .node("add") \
            .param("emoji_id") \
            .param("content", action="add", multiple=True) \
            .parent().parent().parent() \
            .node("remove") \
            .param("emoji_id", action="remove") \
            .build()