~tardypad/wee-most

8d6ec8d2106143c14e3a004e12853d1ca0d7e941 — Damien Tardy-Panis 3 months ago f111a5f
Rename "command" subcommand to "slash"

More explicit than generic "command"
Similar to wee-slack
2 files changed, 4 insertions(+), 4 deletions(-)

M README.md
M wee_most/commands.py
M README.md => README.md +1 -1
@@ 45,7 45,7 @@ Then you can connect/disconnect to servers
You can send Mattermost commands using this prefix.

```
/mattermost command me Aya ! :3
/mattermost slash me Aya ! :3
```

## Reply, React, Remove

M wee_most/commands.py => wee_most/commands.py +3 -3
@@ 26,7 26,7 @@ commands = [
        completion = "%(mattermost_server_commands)",
    ),
    Command(
        name = "command",
        name = "slash",
        args = "<mattermost-command>",
        description = "send a plain slash command",
        completion = "%(mattermost_slash_commands)",


@@ 96,7 96,7 @@ def server_command(args, buffer):

def slash_command(args, buffer):
    if 0 == len(args.split()):
        write_command_error(buffer, "command " + args, "Error with subcommand arguments")
        write_command_error(buffer, "slash " + args, "Error with subcommand arguments")
        return weechat.WEECHAT_RC_ERROR

    server = wee_most.server.get_server_from_buffer(buffer)


@@ 119,7 119,7 @@ def mattermost_command_cb(data, buffer, command):
        return connect_command(args, buffer)
    if prefix == "disconnect":
        return disconnect_command(args, buffer)
    if prefix == "command":
    if prefix == "slash":
        return slash_command(args, buffer)
    if prefix == "reply":
        return reply_command(args, buffer)