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

@@ -133,13 +133,13 @@ class FreqtradeBot(LoggingMixin):
# Initialize protections AFTER bot start - otherwise parameters are not loaded.
self.protections = ProtectionManager(self.config, self.strategy.protections)
def notify_status(self, msg: str) -> None:
def notify_status(self, msg: str, msg_type=RPCMessageType.STATUS) -> None:
"""
Public method for users of this class (worker, etc.) to send notifications
via RPC about changes in the bot status.
"""
self.rpc.send_msg({
'type': RPCMessageType.STATUS,
'type': msg_type,
'status': msg
})