From a8b97d1bf45a01ff8e8b8f5a2636283a50cf899f Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jan 2022 17:00:59 +0100 Subject: [PATCH] modules/CommandDrinkBindAccount.py --- modules/CommandDrinkBindAccount.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/CommandDrinkBindAccount.py b/modules/CommandDrinkBindAccount.py index 4bade6f..6af7ba5 100644 --- a/modules/CommandDrinkBindAccount.py +++ b/modules/CommandDrinkBindAccount.py @@ -14,7 +14,7 @@ class CommandDrinkBindAccount(AbstractCommand): CONFIG = {"display_name": "somebot-command", "auto_complete": True, "auto_complete_hint": " ", } - USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Bind your drink-terminal-account to your mattermost username." + USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = AbstractCommand.ICON_PRIVATE+"Bind your drink-terminal-account to your mattermost username." def on_POST(self, request, data): @@ -33,12 +33,12 @@ class CommandDrinkBindAccount(AbstractCommand): handle.manage_token('add', 'MM_'+data["user_id"]) except MCAPI.APIException as e: if e.message == 'CERR_AUTH_FAIL_ACCPWDRATE': - request.cmd_respond_text_temp(":stop_sign: Failed to bind Mattermost account to drink-terminal account: Invalid drink-terminal credentials :(") + request.respond_cmd_err("Failed to bind Mattermost account to drink-terminal account: Invalid drink-terminal credentials.") elif e.message == 'CERR_FAILED_TO_ADD_TOKEN_EXISTING': - request.cmd_respond_text_temp(":warning: Failed to bind Mattermost account to drink-terminal account: Mattermost username is already bound to an account.") + request.respond_cmd_err("Failed to bind Mattermost account to drink-terminal account: Mattermost username is already bound to an account.") else: - request.cmd_respond_text_temp(":warning: Failed to bind Mattermost account to drink-terminal account: Unknown error: "+ e.message) + request.respond_cmd_err("Failed to bind Mattermost account to drink-terminal account: Unknown error: "+repr(e)) return - request.cmd_respond_text_temp(":white_check_mark: Sucessfully bound Mattermost account and drink-terminal account :)") self.bot.debug_chan("``/drink-bind-account success: @"+data["user_name"]+'``') + request.respond_cmd_temp("## :white_check_mark: Success! :)\n####Sucessfully bound Mattermost account and drink-terminal account :)") -- 2.43.0