π Helper#
- class tt.plugins.default_plugins.helper_plugin.HelperPlugin[source]#
Helper Plugin Provide multiple function such as giving the list of available command, network ping or restarting the bot
Initialize the object.
- This function is the constructor of the class.
It initializes the object by calling the parent classβs constructor using the super() method.
It also sets the enabled attribute to the value of the helper_enabled setting.
If the enabled attribute is True, it sets the host_ip attribute to a formatted string that includes the result of the get_host_ip() method. It also sets the help_message attribute to the value of the helper_commands setting.
- name = 'helper_plugin'#
- __init__()[source]#
Initialize the object.
- This function is the constructor of the class.
It initializes the object by calling the parent classβs constructor using the super() method.
It also sets the enabled attribute to the value of the helper_enabled setting.
If the enabled attribute is True, it sets the host_ip attribute to a formatted string that includes the result of the get_host_ip() method. It also sets the help_message attribute to the value of the helper_commands setting.
- async start()[source]#
Asynchronously starts the plugin by sending a notification using the send_notification method. The notification is obtained by calling the get_helper_info method asynchronously.
- Returns:
None
- async handle_message(msg)[source]#
Handles incoming messages and routes them to the appropriate function.
- Parameters:
msg (str) β The message received by the plugin.
- Returns:
If the message should not be handled. None: If the message is a command and the corresponding function is executed successfully. None: If the message is not a command.
- Return type:
None
Supported functions are:
get_helper_help()
get_helper_info()
get_helper_network()
trading_switch_command()
restart()
- async get_helper_info() str[source]#
/infocommand to return the name and version of the bot and the list of enabled plugins and options#todo move all the settings in the init
- async get_helper_network() str[source]#
/networkcommand to retrieve the network ping latency and the botβs public IP address The network ping is using Ping3 lib more info: kyan001/ping3