|
@@ -637,6 +637,23 @@ This action cannot be undone.
|
|
|
# Add other management commands here if they have quick action buttons
|
|
|
})
|
|
|
|
|
|
+ # Add info commands to the map
|
|
|
+ if hasattr(self, 'info_commands_handler'):
|
|
|
+ command_action_map.update({
|
|
|
+ "balance": self.info_commands_handler.balance_command,
|
|
|
+ "positions": self.info_commands_handler.positions_command,
|
|
|
+ "orders": self.info_commands_handler.orders_command,
|
|
|
+ "stats": self.info_commands_handler.stats_command,
|
|
|
+ "price": self.info_commands_handler.price_command,
|
|
|
+ "market": self.info_commands_handler.market_command,
|
|
|
+ "performance": self.info_commands_handler.performance_command,
|
|
|
+ "daily": self.info_commands_handler.daily_command,
|
|
|
+ "weekly": self.info_commands_handler.weekly_command,
|
|
|
+ "monthly": self.info_commands_handler.monthly_command,
|
|
|
+ "trades": self.info_commands_handler.trades_command,
|
|
|
+ "risk": self.info_commands_handler.risk_command,
|
|
|
+ })
|
|
|
+
|
|
|
# Prepare key for map lookup, stripping leading '/' if present for general commands
|
|
|
mapped_command_key = callback_data
|
|
|
if callback_data.startswith('/') and not callback_data.startswith('/confirm_'): # Avoid stripping for confirm actions
|
|
@@ -663,10 +680,6 @@ This action cannot be undone.
|
|
|
return # Handled
|
|
|
|
|
|
# Special handling for 'help' callback from InfoCommands quick menu
|
|
|
- # This check should use the modified key as well if we want /help to work via this mechanism
|
|
|
- # However, the 'help' key in command_action_map is 'help', not '/help'.
|
|
|
- # The current 'help' handling is separate and specific. Let's adjust it for consistency if needed or verify.
|
|
|
- # The previous change to info_commands.py made help callback_data='/help'.
|
|
|
if callback_data == "/help": # Check for the actual callback_data value
|
|
|
logger.info("Handling '/help' button callback. Guiding user to /help command.")
|
|
|
try:
|