vamo_telbot.config.telegram =========================== .. py:module:: vamo_telbot.config.telegram .. autoapi-nested-parse:: Telegram Bot configuration. Handles loading and saving the Bot configuration and secrets. Attributes ---------- .. autoapisummary:: vamo_telbot.config.telegram._API_ID_KEY vamo_telbot.config.telegram._API_HASH_KEY vamo_telbot.config.telegram._BOT_TOKEN_KEY vamo_telbot.config.telegram.HASH_OR_TOKEN_NOT_SET vamo_telbot.config.telegram.ID_NOT_SET Functions --------- .. autoapisummary:: vamo_telbot.config.telegram.load_api_id vamo_telbot.config.telegram.save_api_id vamo_telbot.config.telegram.load_api_hash vamo_telbot.config.telegram.save_api_hash vamo_telbot.config.telegram.load_bot_token vamo_telbot.config.telegram.save_bot_token Module Contents --------------- .. py:data:: _API_ID_KEY :type: Final[str] :value: 'api_id' .. py:data:: _API_HASH_KEY :type: Final[str] :value: 'api_hash' .. py:data:: _BOT_TOKEN_KEY :type: Final[str] :value: 'bot_token' .. py:data:: HASH_OR_TOKEN_NOT_SET :type: Final[str] :value: 'NOT_SET' .. py:data:: ID_NOT_SET :type: Final[int] :value: 1 .. py:function:: load_api_id() Load the telegram API ID from the configuration file. :returns: The stored API ID if present, otherwise ``ID_NOT_SET``. .. py:function:: save_api_id(api_id) Persist the API ID into the configuration file. :param api_id: API ID to store. .. py:function:: load_api_hash() Load the telegram API HASH from the configuration file. :returns: The stored API HASH if present, otherwise ``HASH_OR_TOKEN_NOT_SET``. .. py:function:: save_api_hash(api_hash) Persist the API HASH into the configuration file. :param api_hash: API HASH to store. .. py:function:: load_bot_token() Load the telegram Bot Token from the configuration file. :returns: The stored Bot Token if present, otherwise ``HASH_OR_TOKEN_NOT_SET``. .. py:function:: save_bot_token(bot_token) Persist the Bot Token into the configuration file. :param bot_token: Bot Token to store.