chore: remove _pause handler to use already existing _stopentry handler

This commit is contained in:
Axel-CH
2025-03-23 14:44:30 -04:00
parent 0adb264c9b
commit b6b3429b62

View File

@@ -1245,18 +1245,6 @@ class Telegram(RPCHandler):
msg = self._rpc._rpc_start()
await self._send_msg(f"Status: `{msg['status']}`")
@authorized_only
async def _pause(self, update: Update, context: CallbackContext) -> None:
"""
Handler for /pause.
pauses entry positions on TradeThread
:param bot: telegram bot
:param update: message update
:return: None
"""
msg = self._rpc._rpc_stopentry()
await self._send_msg(f"Status: `{msg['status']}`")
@authorized_only
async def _stop(self, update: Update, context: CallbackContext) -> None:
"""
@@ -1284,7 +1272,7 @@ class Telegram(RPCHandler):
@authorized_only
async def _stopentry(self, update: Update, context: CallbackContext) -> None:
"""
Handler for /stop_buy.
Handler for /stop_buy /stop_entry and /pause.
Sets max_open_trades to 0 and gracefully sells all open trades
:param bot: telegram bot
:param update: message update