bot
Proxy seller bot.
The bot allows users to purchase proxy services through Telegram.
Modules:
-
cache–Bot Redis cache module.
-
core–Bot core.
-
handlers–Bot handlers.
-
middlewares–Bot middlewares.
cache
Bot Redis cache module.
This module provides a simple interface to interact with a Redis cache server.
Modules:
-
redis–Redis cache for bot
redis
Redis cache for bot
core
Bot core.
This package contains the core functionalities and components of the bot.
Modules:
-
config–This module loads a settings from .env_file.
-
main–This module contains the main entry point for the proxy seller bot.
config
This module loads a settings from .env_file.
Classes:
-
BotSettings–Bot settings class to load bot-specific environment variables.
-
CacheSettings–Cache settings class to load cache-specific environment variables.
-
DBSettings–Database settings class to load database-specific environment variables.
-
EnvBaseSettings–Base settings class to load environment variables from a .env file.
-
Settings–Settings class to load all environment variables.
BotSettings
Bot settings class to load bot-specific environment variables.
CacheSettings
Cache settings class to load cache-specific environment variables.
DBSettings
Database settings class to load database-specific environment variables.
Attributes:
-
database_url(URL | str) –Construct the database URL for SQLModel.
EnvBaseSettings
Base settings class to load environment variables from a .env file.
Settings
Settings class to load all environment variables.
Attributes:
-
database_url(URL | str) –Construct the database URL for SQLModel.
main
This module contains the main entry point for the proxy seller bot.
Functions:
-
main–Create the entry instances and start the bot.
main
async
main() -> None
Create the entry instances and start the bot.
Args: None
Returns: None
Raises: None
Source code in bot/core/main.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
handlers
Bot handlers.
This package contains various handlers for the bot.
Modules:
-
start–Start handler module.
start
Start handler module.
This module contains the start handler for the bot.
Functions:
-
cmd_start–Start handler for the bot.
cmd_start
async
cmd_start(message: Message)
Start handler for the bot.
Parameters:
-
(messageMessage) –The message object.
Returns:
-
–
None
Source code in bot/handlers/start.py
14 15 16 17 18 19 20 21 22 23 24 25 26 | |
middlewares
Bot middlewares.
This package contains middleware components for the bot.
Modules:
-
i18n–i18n middleware.
i18n
i18n middleware.
Bot middleware for handling internationalization in the bot.