Improve formatting of telegram message
This commit is contained in:
@@ -6,7 +6,7 @@ from abc import abstractmethod
|
||||
from datetime import date, datetime, timedelta
|
||||
from enum import Enum
|
||||
from math import isnan
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
|
||||
import arrow
|
||||
from numpy import NAN, mean
|
||||
@@ -538,7 +538,7 @@ class RPC:
|
||||
else:
|
||||
return None
|
||||
|
||||
def _rpc_delete(self, trade_id: str) -> Dict[str, str]:
|
||||
def _rpc_delete(self, trade_id: str) -> Dict[str, Union[str, int]]:
|
||||
"""
|
||||
Handler for delete <id>.
|
||||
Delete the given trade and close eventually existing open orders.
|
||||
|
@@ -547,7 +547,10 @@ class Telegram(RPC):
|
||||
trade_id = context.args[0] if len(context.args) > 0 else None
|
||||
try:
|
||||
msg = self._rpc_delete(trade_id)
|
||||
self._send_msg('Delete Result: `{result_msg}`'.format(**msg))
|
||||
self._send_msg((
|
||||
'Delete Result: `{result_msg}`'
|
||||
'Please make sure to take care of this asset on the exchange manually.'
|
||||
).format(**msg))
|
||||
|
||||
except RPCException as e:
|
||||
self._send_msg(str(e))
|
||||
|
Reference in New Issue
Block a user