telegram: Fix sending telegram message with exception

This commit is contained in:
Matthias
2023-03-10 18:00:20 +01:00
parent 5b2a291109
commit a76ca771f8
5 changed files with 12 additions and 4 deletions

View File

@@ -414,6 +414,9 @@ class Telegram(RPCHandler):
elif msg_type == RPCMessageType.WARNING:
message = f"\N{WARNING SIGN} *Warning:* `{msg['status']}`"
elif msg_type == RPCMessageType.EXCEPTION:
# Errors will contain exceptions, which are wrapped in tripple ticks.
message = f"\N{WARNING SIGN} *ERROR:* \n {msg['status']}"
elif msg_type == RPCMessageType.STARTUP:
message = f"{msg['status']}"