pytmbot

🎛️ PyTMBot Command-Line Arguments

The PyTMBot supports several command-line arguments to customize its behavior. Below is a detailed description of each argument you can use when starting the bot.

🛠️ Arguments

Argument Type Default Choices Description
--mode str prod dev, prod Select the mode of operation for PyTMBot. Use dev for development and prod for production.
--log-level str INFO DEBUG, INFO, ERROR Set the logging level for the bot. More verbose logs can be helpful during development.
--webhook str False True, False Start the bot in webhook mode. Useful for receiving updates via HTTP callbacks.
--socket_host str 127.0.0.1 N/A Define the host address for the socket to listen on in webhook mode. Default is localhost.
--plugins list [] N/A Specify a list of plugins to load when starting the bot. Separate multiple plugins with spaces.
--salt str False N/A Generate unique salt for using it in TOTP auth

📄 Required Configurations

Depending on the command-line arguments you choose, certain configuration settings must be filled out in your configuration file. Below are the sections you need to complete:

General Bot Settings

Webhook Configuration (if using --webhook True)

Bot cannot be run in 80 port for security reasons. Use reverse proxy to run the bot (e.g. Nginx, Nginx Proxy Manager or Traefik).

Plugins Configuration (if using --plugins)

🚀 Usage Example

To start the PyTMBot in development mode with debug logging and the monitor plugin enabled, you can run the following command:

python main.py --mode dev --log-level DEBUG --plugins monitor

To run the bot in production mode with webhook support, use:

python main.py --mode prod --webhook True

📜 Notes

Happy Botting! 🤖