From 8ad46b2d3c85cb145b4dd403debb380d5a35afbd Mon Sep 17 00:00:00 2001 From: Someone Date: Wed, 12 Jan 2022 21:47:44 +0100 Subject: [PATCH] modules/CommandDrink.py --- modules/CommandDrink.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/CommandDrink.py b/modules/CommandDrink.py index 540daf9..1e10757 100644 --- a/modules/CommandDrink.py +++ b/modules/CommandDrink.py @@ -8,7 +8,6 @@ import datetime import MCAPI - # pylint: disable=wrong-import-position from AbstractCommand import AbstractCommand class CommandDrink(AbstractCommand): @@ -37,12 +36,14 @@ class CommandDrink(AbstractCommand): account_data = handle.get_account_info() msg = ":arrow_right: Available credits:``"+str(account_data["account_info"]["balance"])+"``" except MCAPI.APIException as exc: - if exc.message == "CERR_AUTH_FAIL_INVALID_token": + if exc.message == "AUTH_FAIL_ACCTOK": request.respond_cmd_temp(cleandoc(""" :stop_sign: Mattermost account seems to not be bound to any drink-terminal account. :( Use ``/drink-bind-account `` to bind this Mattermost account to your drink-terminal account. """)) return + raise exc + try: cmd = data["text"] = data["text"].strip() -- 2.43.0