improve formatting, add tests

This commit is contained in:
Matthias
2021-09-20 19:49:18 +02:00
parent dd0db7ee5d
commit fd23ab3d64
3 changed files with 27 additions and 5 deletions

View File

@@ -284,12 +284,12 @@ class Telegram(RPCHandler):
elif msg_type == RPCMessageType.PROTECTION_TRIGGER:
message = (
"*Protection* triggered due to {reason}. "
"{pair} will be locked until {lock_end_time}."
"`{pair}` will be locked until `{lock_end_time}`."
).format(**msg)
elif msg_type == RPCMessageType.PROTECTION_TRIGGER_GLOBAL:
message = (
"*Protection* triggered due to {reason}. "
"All pairs will be locked until {lock_end_time}."
"*All pairs* will be locked until `{lock_end_time}`."
).format(**msg)
elif msg_type == RPCMessageType.STATUS:
message = '*Status:* `{status}`'.format(**msg)