diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 01:09:38 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 01:09:38 +0300 |
commit | 56c0fd5f6d287615c0afe794c5aac05e06e2cbca (patch) | |
tree | c7ddf4107ab693794dd21c238f10572698078504 /inverter-bot | |
parent | 75b9ba8dda23a67a578c1a0c6a3163029dcc4bf0 (diff) | |
parent | ebbcded71eaa7203f79326354249fb640853e447 (diff) |
Merge branch 'master' into shell-backdoorshell-backdoor
Diffstat (limited to 'inverter-bot')
-rwxr-xr-x | inverter-bot | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inverter-bot b/inverter-bot index d16359d..f6fac92 100755 --- a/inverter-bot +++ b/inverter-bot @@ -88,7 +88,8 @@ def handle_exc(update: Update, e) -> None: err = json.loads(str(e))['message'] except json.decoder.JSONDecodeError: err = str(e) - reply(update, f'<b>Error:</b> {err}') + err = re.sub(r'((?:.*)?error:) (.*)', r'<b>\1</b> \2', err) + reply(update, err) elif not isinstance(e, TimedOut): reply(update, 'exception: ' + str(e)) |