πŸ›Ÿ 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

network ping is using Ping3 lib more info: kyan001/ping3

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]#

Starts the plugin

async send_notification(message)[source]#

Sends a notification

async handle_message(msg)[source]#

Handles incoming messages

async get_helper_help()[source]#

Help Message /help command to return the list of available command

async get_helper_info() str[source]#

/info command to return the name and version of the bot

async get_helper_network() str[source]#

/network command to retrieve the network ping latency and the bot’s public IP address

async trading_switch_command() str[source]#

Trading switch command /trading command to turn off or on the trading capability

async restart()[source]#

/restart command to restart the bot

static get_host_ip() str[source]#

Returns bot IP address