Update telegram message formatting

This commit is contained in:
Matthias
2022-04-04 19:37:23 +02:00
parent 7d3116f9fb
commit 0db5d9f7fa
2 changed files with 8 additions and 6 deletions

View File

@@ -233,8 +233,7 @@ class Telegram(RPCHandler):
is_fill = msg['type'] in [RPCMessageType.ENTRY_FILL]
emoji = '\N{CHECK MARK}' if is_fill else '\N{LARGE BLUE CIRCLE}'
enter_side = ({'enter': 'Long', 'entered': 'Longed'} if msg['type']
in [RPCMessageType.ENTRY_FILL, RPCMessageType.ENTRY]
enter_side = ({'enter': 'Long', 'entered': 'Longed'} if msg['direction'] == 'Long'
else {'enter': 'Short', 'entered': 'Shorted'})
message = (
f"{emoji} *{msg['exchange']}:*"