config

Classes

Config

Configuration class for retrieving and validating environment variables required

Module Contents

class Config

Configuration class for retrieving and validating environment variables required for the Telegram bot.

TELEGRAM_API_TOKEN

The API token for the Telegram bot, retrieved from the environment variables.

Type:

str

TELEGRAM_BOT_USERNAME

The username of the Telegram bot, retrieved from the environment variables.

Type:

str

DISCORD_API_TOKEN

The API token for the Discord bot, retrieved from the environment variables.

Type:

str

DISCORD_CHANNEL_ID

The channel ID for the Discord bot, retrieved from the environment variables.

Type:

str

TELEGRAM_API_TOKEN
TELEGRAM_BOT_USERNAME
DISCORD_API_TOKEN
DISCORD_CHANNEL_ID
classmethod validate()

Validates that the necessary Telegram environment variables are set. If any of the required variables are missing, it raises a ValueError.

Raises:

ValueError – If TELEGRAM_API_TOKEN or TELEGRAM_BOT_USERNAME is not set.