telegram_framework.python_telegram_bot package

Submodules

telegram_framework.python_telegram_bot.actions module

telegram_framework.python_telegram_bot.actions.send_image(chat: Chat, image: Image)[source]
telegram_framework.python_telegram_bot.actions.send_message(chat: Chat, message: Message)[source]
telegram_framework.python_telegram_bot.actions.send_reply(reply: Reply)[source]
telegram_framework.python_telegram_bot.actions.wait_response(bot, chat, handler)[source]

telegram_framework.python_telegram_bot.adapters module

class telegram_framework.python_telegram_bot.adapters.Sender(user_data)[source]

Bases: object

telegram_framework.python_telegram_bot.adapters.adapt_data(update, handler_function, bot, *args, **kwargs)[source]
telegram_framework.python_telegram_bot.adapters.prepare_call_handler(handler_function, bot)[source]

Обёртка для callback_query handler. Передаёт адаптированные данные в handler_function.

telegram_framework.python_telegram_bot.adapters.prepare_handler(handler_function, bot)[source]
telegram_framework.python_telegram_bot.adapters.prepare_message(update: Update)[source]
telegram_framework.python_telegram_bot.adapters.to_call(update: Update)[source]
telegram_framework.python_telegram_bot.adapters.to_chat(ptb_chat: Chat)[source]
telegram_framework.python_telegram_bot.adapters.to_chat_info(ptb_chat: Chat) Info[source]
telegram_framework.python_telegram_bot.adapters.to_message(update: Update)[source]
telegram_framework.python_telegram_bot.adapters.to_user_data(from_user: User) UserData[source]

telegram_framework.python_telegram_bot.bots module

telegram_framework.python_telegram_bot.bots.get_bot(token)[source]
telegram_framework.python_telegram_bot.bots.get_commands_list(bot: Updater) list[source]
telegram_framework.python_telegram_bot.bots.register_call_handler(bot: Updater, handler: Callable, call_data: str, filter_function: Callable = None)[source]
Parameters:
  • bot – Updater

  • handler – функция-обработчик

  • call_data – callback_data кнопки

  • filter_function – -> bool для фильтрации

telegram_framework.python_telegram_bot.bots.register_command_handler(bot: Updater, handler: Callable, name: str, filter_function=None)[source]
telegram_framework.python_telegram_bot.bots.register_message_handler(bot: Updater, handler: Callable, filter_function: Callable = <function <lambda>>)[source]
telegram_framework.python_telegram_bot.bots.register_next_step_handler(bot: Updater, chat, handler: Callable)[source]
telegram_framework.python_telegram_bot.bots.register_text_handler(bot: Updater, handler: Callable, text: str)[source]
telegram_framework.python_telegram_bot.bots.start(bot: Updater)[source]

telegram_framework.python_telegram_bot.params module

telegram_framework.python_telegram_bot.params.get_param_call_handler(params_pattern, handler: Callable)[source]
telegram_framework.python_telegram_bot.params.get_param_command_handler(params_pattern, handler: Callable)[source]

Module contents