From 6b1b7dae76dca4f9f395dfad2ef24d604585a1df Mon Sep 17 00:00:00 2001 From: Someone Date: Tue, 6 Jun 2023 20:26:56 +0200 Subject: [PATCH] modules/CommandDrink.py --- modules/CommandDrink.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/CommandDrink.py b/modules/CommandDrink.py index 9dbdec4..708a424 100644 --- a/modules/CommandDrink.py +++ b/modules/CommandDrink.py @@ -34,7 +34,7 @@ class CommandDrink(AbstractCommand): handle = MCAPI.API("MM", data["user_id"]) MCAPI.API.token_secret = token_secret["token_secret"] account_data = handle.get_account_info() - msg = ":arrow_right: Available credits:``"+str(account_data["account_info"]["balance"])+"``" + msg = ":arrow_right: Available credits:``"+str(account_data["account_info"]["balance"])+"`` for username ``"+str(account_data["account_info"]["accname"])+"``" except MCAPI.APIException as exc: if exc.message == "CERR_AUTH_FAIL_ACCTOK": request.respond_cmd_temp(cleandoc(""" @@ -101,4 +101,8 @@ class CommandDrink(AbstractCommand): elif exc.message == "CERR_FAILED_TO_SEND": msg += "\n:stop_sign: Failed to send drink-credits. Balance exceeded? Sending too much? :(\nTried to send **``"+str(int(shortcut["amount"])*count)+"``** TO **``"+str(shortcut["target"])+"``** FOR **``"+str(shortcut["reason"])+"``**" + elif exc.message == "CERR_AUTH_FAIL_INVALID_token_secret": + msg += "\n:stop_sign: Mattermost failed to secure the payments subsystem. This is usually a transient error and you can retry immediately. :(" + + request.respond_cmd_err(msg) -- 2.43.0