Skip to content

alicebot.adapter.telegram.api

Telegram API 定义。

abstract class TelegramAPIBase

Bases: abc.ABC

async method call_api(self, api, *, response_type = None, **params)

  • Arguments

    • api (str)

    • response_type (Union[type[~_T], Any, NoneType])

    • params (Any)

  • Returns

    Type: Any

abstract class TelegramAPI

Bases: alicebot.adapter.telegram.api.TelegramAPIBase, abc.ABC

async method add_sticker_to_set(self, *, user_id, name, sticker)

  • Arguments

    • user_id (int)

    • name (str)

    • sticker (alicebot.adapter.telegram.model.InputSticker)

  • Returns

    Type: bool

async method answer_callback_query(self, *, callback_query_id, text = None, show_alert = None, url = None, cache_time = None)

  • Arguments

    • callback_query_id (str)

    • text (str | None)

    • show_alert (bool | None)

    • url (str | None)

    • cache_time (int | None)

  • Returns

    Type: bool

async method answer_inline_query(self, *, inline_query_id, results, cache_time = None, is_personal = None, next_offset = None, button = None)

  • Arguments

    • inline_query_id (str)

    • results (list[typing.Union[alicebot.adapter.telegram.model.InlineQueryResultCachedAudio, alicebot.adapter.telegram.model.InlineQueryResultCachedDocument, alicebot.adapter.telegram.model.InlineQueryResultCachedGif, alicebot.adapter.telegram.model.InlineQueryResultCachedMpeg4Gif, alicebot.adapter.telegram.model.InlineQueryResultCachedPhoto, alicebot.adapter.telegram.model.InlineQueryResultCachedSticker, alicebot.adapter.telegram.model.InlineQueryResultCachedVideo, alicebot.adapter.telegram.model.InlineQueryResultCachedVoice, alicebot.adapter.telegram.model.InlineQueryResultArticle, alicebot.adapter.telegram.model.InlineQueryResultAudio, alicebot.adapter.telegram.model.InlineQueryResultContact, alicebot.adapter.telegram.model.InlineQueryResultGame, alicebot.adapter.telegram.model.InlineQueryResultDocument, alicebot.adapter.telegram.model.InlineQueryResultGif, alicebot.adapter.telegram.model.InlineQueryResultLocation, alicebot.adapter.telegram.model.InlineQueryResultMpeg4Gif, alicebot.adapter.telegram.model.InlineQueryResultPhoto, alicebot.adapter.telegram.model.InlineQueryResultVenue, alicebot.adapter.telegram.model.InlineQueryResultVideo, alicebot.adapter.telegram.model.InlineQueryResultVoice]])

    • cache_time (int | None)

    • is_personal (bool | None)

    • next_offset (str | None)

    • button (alicebot.adapter.telegram.model.InlineQueryResultsButton | None)

  • Returns

    Type: bool

async method answer_pre_checkout_query(self, *, pre_checkout_query_id, ok, error_message = None)

  • Arguments

    • pre_checkout_query_id (str)

    • ok (bool)

    • error_message (str | None)

  • Returns

    Type: bool

async method answer_shipping_query(self, *, shipping_query_id, ok, shipping_options = None, error_message = None)

  • Arguments

    • shipping_query_id (str)

    • ok (bool)

    • shipping_options (list[alicebot.adapter.telegram.model.ShippingOption] | None)

    • error_message (str | None)

  • Returns

    Type: bool

async method answer_web_app_query(self, *, web_app_query_id, result)

  • Arguments

    • web_app_query_id (str)

    • result (Union[alicebot.adapter.telegram.model.InlineQueryResultCachedAudio, alicebot.adapter.telegram.model.InlineQueryResultCachedDocument, alicebot.adapter.telegram.model.InlineQueryResultCachedGif, alicebot.adapter.telegram.model.InlineQueryResultCachedMpeg4Gif, alicebot.adapter.telegram.model.InlineQueryResultCachedPhoto, alicebot.adapter.telegram.model.InlineQueryResultCachedSticker, alicebot.adapter.telegram.model.InlineQueryResultCachedVideo, alicebot.adapter.telegram.model.InlineQueryResultCachedVoice, alicebot.adapter.telegram.model.InlineQueryResultArticle, alicebot.adapter.telegram.model.InlineQueryResultAudio, alicebot.adapter.telegram.model.InlineQueryResultContact, alicebot.adapter.telegram.model.InlineQueryResultGame, alicebot.adapter.telegram.model.InlineQueryResultDocument, alicebot.adapter.telegram.model.InlineQueryResultGif, alicebot.adapter.telegram.model.InlineQueryResultLocation, alicebot.adapter.telegram.model.InlineQueryResultMpeg4Gif, alicebot.adapter.telegram.model.InlineQueryResultPhoto, alicebot.adapter.telegram.model.InlineQueryResultVenue, alicebot.adapter.telegram.model.InlineQueryResultVideo, alicebot.adapter.telegram.model.InlineQueryResultVoice])

  • Returns

    Type: alicebot.adapter.telegram.model.SentWebAppMessage

async method approve_chat_join_request(self, *, chat_id, user_id)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

  • Returns

    Type: bool

async method ban_chat_member(self, *, chat_id, user_id, until_date = None, revoke_messages = None)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

    • until_date (int | None)

    • revoke_messages (bool | None)

  • Returns

    Type: bool

async method ban_chat_sender_chat(self, *, chat_id, sender_chat_id)

  • Arguments

    • chat_id (Union[int, str])

    • sender_chat_id (int)

  • Returns

    Type: bool

async method close(self)

  • Returns

    Type: bool

async method close_forum_topic(self, *, chat_id, message_thread_id)

  • Arguments

    • chat_id (Union[int, str])

    • message_thread_id (int)

  • Returns

    Type: bool

async method close_general_forum_topic(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method convert_gift_to_stars(self, *, business_connection_id, owned_gift_id)

  • Arguments

    • business_connection_id (str)

    • owned_gift_id (str)

  • Returns

    Type: bool

async method copy_message(self, *, chat_id, from_chat_id, message_id, message_thread_id = None, video_start_timestamp = None, caption = None, parse_mode = None, caption_entities = None, show_caption_above_media = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • from_chat_id (Union[int, str])

    • message_id (int)

    • message_thread_id (int | None)

    • video_start_timestamp (int | None)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • show_caption_above_media (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.MessageId

async method copy_messages(self, *, chat_id, from_chat_id, message_ids, message_thread_id = None, disable_notification = None, protect_content = None, remove_caption = None)

  • Arguments

    • chat_id (Union[int, str])

    • from_chat_id (Union[int, str])

    • message_ids (list[int])

    • message_thread_id (int | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • remove_caption (bool | None)

  • Returns

    Type: list[alicebot.adapter.telegram.model.MessageId]

  • Arguments

    • chat_id (Union[int, str])

    • name (str | None)

    • expire_date (int | None)

    • member_limit (int | None)

    • creates_join_request (bool | None)

  • Returns

    Type: alicebot.adapter.telegram.model.ChatInviteLink

  • Arguments

    • chat_id (Union[int, str])

    • subscription_period (int)

    • subscription_price (int)

    • name (str | None)

  • Returns

    Type: alicebot.adapter.telegram.model.ChatInviteLink

async method create_forum_topic(self, *, chat_id, name, icon_color = None, icon_custom_emoji_id = None)

  • Arguments

    • chat_id (Union[int, str])

    • name (str)

    • icon_color (int | None)

    • icon_custom_emoji_id (str | None)

  • Returns

    Type: alicebot.adapter.telegram.model.ForumTopic

  • Arguments

    • title (str)

    • description (str)

    • payload (str)

    • currency (str)

    • prices (list[alicebot.adapter.telegram.model.LabeledPrice])

    • business_connection_id (str | None)

    • provider_token (str | None)

    • subscription_period (int | None)

    • max_tip_amount (int | None)

    • suggested_tip_amounts (list[int] | None)

    • provider_data (str | None)

    • photo_url (str | None)

    • photo_size (int | None)

    • photo_width (int | None)

    • photo_height (int | None)

    • need_name (bool | None)

    • need_phone_number (bool | None)

    • need_email (bool | None)

    • need_shipping_address (bool | None)

    • send_phone_number_to_provider (bool | None)

    • send_email_to_provider (bool | None)

    • is_flexible (bool | None)

  • Returns

    Type: str

async method create_new_sticker_set(self, *, user_id, name, title, stickers, sticker_type = None, needs_repainting = None)

  • Arguments

    • user_id (int)

    • name (str)

    • title (str)

    • stickers (list[alicebot.adapter.telegram.model.InputSticker])

    • sticker_type (str | None)

    • needs_repainting (bool | None)

  • Returns

    Type: bool

async method decline_chat_join_request(self, *, chat_id, user_id)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

  • Returns

    Type: bool

async method delete_business_messages(self, *, business_connection_id, message_ids)

  • Arguments

    • business_connection_id (str)

    • message_ids (list[int])

  • Returns

    Type: bool

async method delete_chat_photo(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method delete_chat_sticker_set(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method delete_forum_topic(self, *, chat_id, message_thread_id)

  • Arguments

    • chat_id (Union[int, str])

    • message_thread_id (int)

  • Returns

    Type: bool

async method delete_message(self, *, chat_id, message_id)

  • Arguments

    • chat_id (Union[int, str])

    • message_id (int)

  • Returns

    Type: bool

async method delete_messages(self, *, chat_id, message_ids)

  • Arguments

    • chat_id (Union[int, str])

    • message_ids (list[int])

  • Returns

    Type: bool

async method delete_my_commands(self, *, scope = None, language_code = None)

  • Arguments

    • scope (Union[alicebot.adapter.telegram.model.BotCommandScopeDefault, alicebot.adapter.telegram.model.BotCommandScopeAllPrivateChats, alicebot.adapter.telegram.model.BotCommandScopeAllGroupChats, alicebot.adapter.telegram.model.BotCommandScopeAllChatAdministrators, alicebot.adapter.telegram.model.BotCommandScopeChat, alicebot.adapter.telegram.model.BotCommandScopeChatAdministrators, alicebot.adapter.telegram.model.BotCommandScopeChatMember, NoneType])

    • language_code (str | None)

  • Returns

    Type: bool

async method delete_sticker_from_set(self, *, sticker)

  • Arguments

    • sticker (str)
  • Returns

    Type: bool

async method delete_sticker_set(self, *, name)

  • Arguments

    • name (str)
  • Returns

    Type: bool

async method delete_story(self, *, business_connection_id, story_id)

  • Arguments

    • business_connection_id (str)

    • story_id (int)

  • Returns

    Type: bool

async method delete_webhook(self, *, drop_pending_updates = None)

  • Arguments

    • drop_pending_updates (bool | None)
  • Returns

    Type: bool

  • Arguments

    • chat_id (Union[int, str])

    • invite_link (str)

    • name (str | None)

    • expire_date (int | None)

    • member_limit (int | None)

    • creates_join_request (bool | None)

  • Returns

    Type: alicebot.adapter.telegram.model.ChatInviteLink

  • Arguments

    • chat_id (Union[int, str])

    • invite_link (str)

    • name (str | None)

  • Returns

    Type: alicebot.adapter.telegram.model.ChatInviteLink

async method edit_forum_topic(self, *, chat_id, message_thread_id, name = None, icon_custom_emoji_id = None)

  • Arguments

    • chat_id (Union[int, str])

    • message_thread_id (int)

    • name (str | None)

    • icon_custom_emoji_id (str | None)

  • Returns

    Type: bool

async method edit_general_forum_topic(self, *, chat_id, name)

  • Arguments

    • chat_id (Union[int, str])

    • name (str)

  • Returns

    Type: bool

async method edit_message_caption(self, *, business_connection_id = None, chat_id = None, message_id = None, inline_message_id = None, caption = None, parse_mode = None, caption_entities = None, show_caption_above_media = None, reply_markup = None)

  • Arguments

    • business_connection_id (str | None)

    • chat_id (Union[int, str, NoneType])

    • message_id (int | None)

    • inline_message_id (str | None)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • show_caption_above_media (bool | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.Message, bool]

async method edit_message_live_location(self, *, latitude, longitude, business_connection_id = None, chat_id = None, message_id = None, inline_message_id = None, live_period = None, horizontal_accuracy = None, heading = None, proximity_alert_radius = None, reply_markup = None)

  • Arguments

    • latitude (float)

    • longitude (float)

    • business_connection_id (str | None)

    • chat_id (Union[int, str, NoneType])

    • message_id (int | None)

    • inline_message_id (str | None)

    • live_period (int | None)

    • horizontal_accuracy (float | None)

    • heading (int | None)

    • proximity_alert_radius (int | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.Message, bool]

async method edit_message_media(self, *, media, business_connection_id = None, chat_id = None, message_id = None, inline_message_id = None, reply_markup = None)

  • Arguments

    • media (Union[alicebot.adapter.telegram.model.InputMediaAnimation, alicebot.adapter.telegram.model.InputMediaDocument, alicebot.adapter.telegram.model.InputMediaAudio, alicebot.adapter.telegram.model.InputMediaPhoto, alicebot.adapter.telegram.model.InputMediaVideo])

    • business_connection_id (str | None)

    • chat_id (Union[int, str, NoneType])

    • message_id (int | None)

    • inline_message_id (str | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.Message, bool]

async method edit_message_reply_markup(self, *, business_connection_id = None, chat_id = None, message_id = None, inline_message_id = None, reply_markup = None)

  • Arguments

    • business_connection_id (str | None)

    • chat_id (Union[int, str, NoneType])

    • message_id (int | None)

    • inline_message_id (str | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.Message, bool]

async method edit_message_text(self, *, text, business_connection_id = None, chat_id = None, message_id = None, inline_message_id = None, parse_mode = None, entities = None, link_preview_options = None, reply_markup = None)

  • Arguments

    • text (str)

    • business_connection_id (str | None)

    • chat_id (Union[int, str, NoneType])

    • message_id (int | None)

    • inline_message_id (str | None)

    • parse_mode (str | None)

    • entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • link_preview_options (alicebot.adapter.telegram.model.LinkPreviewOptions | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.Message, bool]

async method edit_story(self, *, business_connection_id, story_id, content, caption = None, parse_mode = None, caption_entities = None, areas = None)

  • Arguments

    • business_connection_id (str)

    • story_id (int)

    • content (Union[alicebot.adapter.telegram.model.InputStoryContentPhoto, alicebot.adapter.telegram.model.InputStoryContentVideo])

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • areas (list[alicebot.adapter.telegram.model.StoryArea] | None)

  • Returns

    Type: alicebot.adapter.telegram.model.Story

async method edit_user_star_subscription(self, *, user_id, telegram_payment_charge_id, is_canceled)

  • Arguments

    • user_id (int)

    • telegram_payment_charge_id (str)

    • is_canceled (bool)

  • Returns

    Type: bool

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: str

async method forward_message(self, *, chat_id, from_chat_id, message_id, message_thread_id = None, video_start_timestamp = None, disable_notification = None, protect_content = None)

  • Arguments

    • chat_id (Union[int, str])

    • from_chat_id (Union[int, str])

    • message_id (int)

    • message_thread_id (int | None)

    • video_start_timestamp (int | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method forward_messages(self, *, chat_id, from_chat_id, message_ids, message_thread_id = None, disable_notification = None, protect_content = None)

  • Arguments

    • chat_id (Union[int, str])

    • from_chat_id (Union[int, str])

    • message_ids (list[int])

    • message_thread_id (int | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

  • Returns

    Type: list[alicebot.adapter.telegram.model.MessageId]

async method get_available_gifts(self)

  • Returns

    Type: alicebot.adapter.telegram.model.Gifts

async method get_business_account_gifts(self, *, business_connection_id, exclude_unsaved = None, exclude_saved = None, exclude_unlimited = None, exclude_limited = None, exclude_unique = None, sort_by_price = None, offset = None, limit = None)

  • Arguments

    • business_connection_id (str)

    • exclude_unsaved (bool | None)

    • exclude_saved (bool | None)

    • exclude_unlimited (bool | None)

    • exclude_limited (bool | None)

    • exclude_unique (bool | None)

    • sort_by_price (bool | None)

    • offset (str | None)

    • limit (int | None)

  • Returns

    Type: alicebot.adapter.telegram.model.OwnedGifts

async method get_business_account_star_balance(self, *, business_connection_id)

  • Arguments

    • business_connection_id (str)
  • Returns

    Type: alicebot.adapter.telegram.model.StarAmount

async method get_business_connection(self, *, business_connection_id)

  • Arguments

    • business_connection_id (str)
  • Returns

    Type: alicebot.adapter.telegram.model.BusinessConnection

async method get_chat(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: alicebot.adapter.telegram.model.ChatFullInfo

async method get_chat_administrators(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: list[typing.Union[alicebot.adapter.telegram.model.ChatMemberOwner, alicebot.adapter.telegram.model.ChatMemberAdministrator, alicebot.adapter.telegram.model.ChatMemberMember, alicebot.adapter.telegram.model.ChatMemberRestricted, alicebot.adapter.telegram.model.ChatMemberLeft, alicebot.adapter.telegram.model.ChatMemberBanned]]

async method get_chat_member(self, *, chat_id, user_id)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.ChatMemberOwner, alicebot.adapter.telegram.model.ChatMemberAdministrator, alicebot.adapter.telegram.model.ChatMemberMember, alicebot.adapter.telegram.model.ChatMemberRestricted, alicebot.adapter.telegram.model.ChatMemberLeft, alicebot.adapter.telegram.model.ChatMemberBanned]

async method get_chat_member_count(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: int

async method get_chat_menu_button(self, *, chat_id = None)

  • Arguments

    • chat_id (int | None)
  • Returns

    Type: Union[alicebot.adapter.telegram.model.MenuButtonCommands, alicebot.adapter.telegram.model.MenuButtonWebApp, alicebot.adapter.telegram.model.MenuButtonDefault]

async method get_custom_emoji_stickers(self, *, custom_emoji_ids)

  • Arguments

    • custom_emoji_ids (list[str])
  • Returns

    Type: list[alicebot.adapter.telegram.model.Sticker]

async method get_file(self, *, file_id)

  • Arguments

    • file_id (str)
  • Returns

    Type: alicebot.adapter.telegram.model.File

async method get_forum_topic_icon_stickers(self)

  • Returns

    Type: list[alicebot.adapter.telegram.model.Sticker]

async method get_game_high_scores(self, *, user_id, chat_id = None, message_id = None, inline_message_id = None)

  • Arguments

    • user_id (int)

    • chat_id (int | None)

    • message_id (int | None)

    • inline_message_id (str | None)

  • Returns

    Type: list[alicebot.adapter.telegram.model.GameHighScore]

async method get_me(self)

  • Returns

    Type: alicebot.adapter.telegram.model.User

async method get_my_commands(self, *, scope = None, language_code = None)

  • Arguments

    • scope (Union[alicebot.adapter.telegram.model.BotCommandScopeDefault, alicebot.adapter.telegram.model.BotCommandScopeAllPrivateChats, alicebot.adapter.telegram.model.BotCommandScopeAllGroupChats, alicebot.adapter.telegram.model.BotCommandScopeAllChatAdministrators, alicebot.adapter.telegram.model.BotCommandScopeChat, alicebot.adapter.telegram.model.BotCommandScopeChatAdministrators, alicebot.adapter.telegram.model.BotCommandScopeChatMember, NoneType])

    • language_code (str | None)

  • Returns

    Type: list[alicebot.adapter.telegram.model.BotCommand]

async method get_my_default_administrator_rights(self, *, for_channels = None)

  • Arguments

    • for_channels (bool | None)
  • Returns

    Type: alicebot.adapter.telegram.model.ChatAdministratorRights

async method get_my_description(self, *, language_code = None)

  • Arguments

    • language_code (str | None)
  • Returns

    Type: alicebot.adapter.telegram.model.BotDescription

async method get_my_name(self, *, language_code = None)

  • Arguments

    • language_code (str | None)
  • Returns

    Type: alicebot.adapter.telegram.model.BotName

async method get_my_short_description(self, *, language_code = None)

  • Arguments

    • language_code (str | None)
  • Returns

    Type: alicebot.adapter.telegram.model.BotShortDescription

async method get_star_transactions(self, *, offset = None, limit = None)

  • Arguments

    • offset (int | None)

    • limit (int | None)

  • Returns

    Type: alicebot.adapter.telegram.model.StarTransactions

async method get_sticker_set(self, *, name)

  • Arguments

    • name (str)
  • Returns

    Type: alicebot.adapter.telegram.model.StickerSet

async method get_updates(self, *, offset = None, limit = None, timeout = None, allowed_updates = None)

  • Arguments

    • offset (int | None)

    • limit (int | None)

    • timeout (int | None)

    • allowed_updates (list[str] | None)

  • Returns

    Type: list[alicebot.adapter.telegram.model.Update]

async method get_user_chat_boosts(self, *, chat_id, user_id)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

  • Returns

    Type: alicebot.adapter.telegram.model.UserChatBoosts

async method get_user_profile_photos(self, *, user_id, offset = None, limit = None)

  • Arguments

    • user_id (int)

    • offset (int | None)

    • limit (int | None)

  • Returns

    Type: alicebot.adapter.telegram.model.UserProfilePhotos

async method get_webhook_info(self)

  • Returns

    Type: alicebot.adapter.telegram.model.WebhookInfo

async method gift_premium_subscription(self, *, user_id, month_count, star_count, text = None, text_parse_mode = None, text_entities = None)

  • Arguments

    • user_id (int)

    • month_count (int)

    • star_count (int)

    • text (str | None)

    • text_parse_mode (str | None)

    • text_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

  • Returns

    Type: bool

async method hide_general_forum_topic(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method leave_chat(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method log_out(self)

  • Returns

    Type: bool

async method pin_chat_message(self, *, chat_id, message_id, business_connection_id = None, disable_notification = None)

  • Arguments

    • chat_id (Union[int, str])

    • message_id (int)

    • business_connection_id (str | None)

    • disable_notification (bool | None)

  • Returns

    Type: bool

async method post_story(self, *, business_connection_id, content, active_period, caption = None, parse_mode = None, caption_entities = None, areas = None, post_to_chat_page = None, protect_content = None)

  • Arguments

    • business_connection_id (str)

    • content (Union[alicebot.adapter.telegram.model.InputStoryContentPhoto, alicebot.adapter.telegram.model.InputStoryContentVideo])

    • active_period (int)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • areas (list[alicebot.adapter.telegram.model.StoryArea] | None)

    • post_to_chat_page (bool | None)

    • protect_content (bool | None)

  • Returns

    Type: alicebot.adapter.telegram.model.Story

async method promote_chat_member(self, *, chat_id, user_id, is_anonymous = None, can_manage_chat = None, can_delete_messages = None, can_manage_video_chats = None, can_restrict_members = None, can_promote_members = None, can_change_info = None, can_invite_users = None, can_post_stories = None, can_edit_stories = None, can_delete_stories = None, can_post_messages = None, can_edit_messages = None, can_pin_messages = None, can_manage_topics = None)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

    • is_anonymous (bool | None)

    • can_manage_chat (bool | None)

    • can_delete_messages (bool | None)

    • can_manage_video_chats (bool | None)

    • can_restrict_members (bool | None)

    • can_promote_members (bool | None)

    • can_change_info (bool | None)

    • can_invite_users (bool | None)

    • can_post_stories (bool | None)

    • can_edit_stories (bool | None)

    • can_delete_stories (bool | None)

    • can_post_messages (bool | None)

    • can_edit_messages (bool | None)

    • can_pin_messages (bool | None)

    • can_manage_topics (bool | None)

  • Returns

    Type: bool

async method read_business_message(self, *, business_connection_id, chat_id, message_id)

  • Arguments

    • business_connection_id (str)

    • chat_id (int)

    • message_id (int)

  • Returns

    Type: bool

async method refund_star_payment(self, *, user_id, telegram_payment_charge_id)

  • Arguments

    • user_id (int)

    • telegram_payment_charge_id (str)

  • Returns

    Type: bool

async method remove_business_account_profile_photo(self, *, business_connection_id, is_public = None)

  • Arguments

    • business_connection_id (str)

    • is_public (bool | None)

  • Returns

    Type: bool

async method remove_chat_verification(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method remove_user_verification(self, *, user_id)

  • Arguments

    • user_id (int)
  • Returns

    Type: bool

async method reopen_forum_topic(self, *, chat_id, message_thread_id)

  • Arguments

    • chat_id (Union[int, str])

    • message_thread_id (int)

  • Returns

    Type: bool

async method reopen_general_forum_topic(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method replace_sticker_in_set(self, *, user_id, name, old_sticker, sticker)

  • Arguments

    • user_id (int)

    • name (str)

    • old_sticker (str)

    • sticker (alicebot.adapter.telegram.model.InputSticker)

  • Returns

    Type: bool

async method restrict_chat_member(self, *, chat_id, user_id, permissions, use_independent_chat_permissions = None, until_date = None)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

    • permissions (alicebot.adapter.telegram.model.ChatPermissions)

    • use_independent_chat_permissions (bool | None)

    • until_date (int | None)

  • Returns

    Type: bool

  • Arguments

    • chat_id (Union[int, str])

    • invite_link (str)

  • Returns

    Type: alicebot.adapter.telegram.model.ChatInviteLink

async method save_prepared_inline_message(self, *, user_id, result, allow_user_chats = None, allow_bot_chats = None, allow_group_chats = None, allow_channel_chats = None)

  • Arguments

    • user_id (int)

    • result (Union[alicebot.adapter.telegram.model.InlineQueryResultCachedAudio, alicebot.adapter.telegram.model.InlineQueryResultCachedDocument, alicebot.adapter.telegram.model.InlineQueryResultCachedGif, alicebot.adapter.telegram.model.InlineQueryResultCachedMpeg4Gif, alicebot.adapter.telegram.model.InlineQueryResultCachedPhoto, alicebot.adapter.telegram.model.InlineQueryResultCachedSticker, alicebot.adapter.telegram.model.InlineQueryResultCachedVideo, alicebot.adapter.telegram.model.InlineQueryResultCachedVoice, alicebot.adapter.telegram.model.InlineQueryResultArticle, alicebot.adapter.telegram.model.InlineQueryResultAudio, alicebot.adapter.telegram.model.InlineQueryResultContact, alicebot.adapter.telegram.model.InlineQueryResultGame, alicebot.adapter.telegram.model.InlineQueryResultDocument, alicebot.adapter.telegram.model.InlineQueryResultGif, alicebot.adapter.telegram.model.InlineQueryResultLocation, alicebot.adapter.telegram.model.InlineQueryResultMpeg4Gif, alicebot.adapter.telegram.model.InlineQueryResultPhoto, alicebot.adapter.telegram.model.InlineQueryResultVenue, alicebot.adapter.telegram.model.InlineQueryResultVideo, alicebot.adapter.telegram.model.InlineQueryResultVoice])

    • allow_user_chats (bool | None)

    • allow_bot_chats (bool | None)

    • allow_group_chats (bool | None)

    • allow_channel_chats (bool | None)

  • Returns

    Type: alicebot.adapter.telegram.model.PreparedInlineMessage

async method send_animation(self, *, chat_id, animation, business_connection_id = None, message_thread_id = None, duration = None, width = None, height = None, thumbnail = None, caption = None, parse_mode = None, caption_entities = None, show_caption_above_media = None, has_spoiler = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • animation (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • duration (int | None)

    • width (int | None)

    • height (int | None)

    • thumbnail (Union[bytes, tuple[str, bytes], str, NoneType])

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • show_caption_above_media (bool | None)

    • has_spoiler (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_audio(self, *, chat_id, audio, business_connection_id = None, message_thread_id = None, caption = None, parse_mode = None, caption_entities = None, duration = None, performer = None, title = None, thumbnail = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • audio (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • duration (int | None)

    • performer (str | None)

    • title (str | None)

    • thumbnail (Union[bytes, tuple[str, bytes], str, NoneType])

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_chat_action(self, *, chat_id, action, business_connection_id = None, message_thread_id = None)

  • Arguments

    • chat_id (Union[int, str])

    • action (str)

    • business_connection_id (str | None)

    • message_thread_id (int | None)

  • Returns

    Type: bool

async method send_contact(self, *, chat_id, phone_number, first_name, business_connection_id = None, message_thread_id = None, last_name = None, vcard = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • phone_number (str)

    • first_name (str)

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • last_name (str | None)

    • vcard (str | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_dice(self, *, chat_id, business_connection_id = None, message_thread_id = None, emoji = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • emoji (str | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_document(self, *, chat_id, document, business_connection_id = None, message_thread_id = None, thumbnail = None, caption = None, parse_mode = None, caption_entities = None, disable_content_type_detection = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • document (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • thumbnail (Union[bytes, tuple[str, bytes], str, NoneType])

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • disable_content_type_detection (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_game(self, *, chat_id, game_short_name, business_connection_id = None, message_thread_id = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (int)

    • game_short_name (str)

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_gift(self, *, gift_id, user_id = None, chat_id = None, pay_for_upgrade = None, text = None, text_parse_mode = None, text_entities = None)

  • Arguments

    • gift_id (str)

    • user_id (int | None)

    • chat_id (Union[int, str, NoneType])

    • pay_for_upgrade (bool | None)

    • text (str | None)

    • text_parse_mode (str | None)

    • text_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

  • Returns

    Type: bool

async method send_invoice(self, *, chat_id, title, description, payload, currency, prices, message_thread_id = None, provider_token = None, max_tip_amount = None, suggested_tip_amounts = None, start_parameter = None, provider_data = None, photo_url = None, photo_size = None, photo_width = None, photo_height = None, need_name = None, need_phone_number = None, need_email = None, need_shipping_address = None, send_phone_number_to_provider = None, send_email_to_provider = None, is_flexible = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • title (str)

    • description (str)

    • payload (str)

    • currency (str)

    • prices (list[alicebot.adapter.telegram.model.LabeledPrice])

    • message_thread_id (int | None)

    • provider_token (str | None)

    • max_tip_amount (int | None)

    • suggested_tip_amounts (list[int] | None)

    • start_parameter (str | None)

    • provider_data (str | None)

    • photo_url (str | None)

    • photo_size (int | None)

    • photo_width (int | None)

    • photo_height (int | None)

    • need_name (bool | None)

    • need_phone_number (bool | None)

    • need_email (bool | None)

    • need_shipping_address (bool | None)

    • send_phone_number_to_provider (bool | None)

    • send_email_to_provider (bool | None)

    • is_flexible (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_location(self, *, chat_id, latitude, longitude, business_connection_id = None, message_thread_id = None, horizontal_accuracy = None, live_period = None, heading = None, proximity_alert_radius = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • latitude (float)

    • longitude (float)

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • horizontal_accuracy (float | None)

    • live_period (int | None)

    • heading (int | None)

    • proximity_alert_radius (int | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_media_group(self, *, chat_id, media, business_connection_id = None, message_thread_id = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None)

  • Arguments

    • chat_id (Union[int, str])

    • media (Union[list[alicebot.adapter.telegram.model.InputMediaAudio], list[alicebot.adapter.telegram.model.InputMediaDocument], list[alicebot.adapter.telegram.model.InputMediaPhoto], list[alicebot.adapter.telegram.model.InputMediaVideo]])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

  • Returns

    Type: list[alicebot.adapter.telegram.model.Message]

async method send_message(self, *, chat_id, text, business_connection_id = None, message_thread_id = None, parse_mode = None, entities = None, link_preview_options = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • text (str)

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • parse_mode (str | None)

    • entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • link_preview_options (alicebot.adapter.telegram.model.LinkPreviewOptions | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_paid_media(self, *, chat_id, star_count, media, business_connection_id = None, payload = None, caption = None, parse_mode = None, caption_entities = None, show_caption_above_media = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • star_count (int)

    • media (list[typing.Union[alicebot.adapter.telegram.model.InputPaidMediaPhoto, alicebot.adapter.telegram.model.InputPaidMediaVideo]])

    • business_connection_id (str | None)

    • payload (str | None)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • show_caption_above_media (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_photo(self, *, chat_id, photo, business_connection_id = None, message_thread_id = None, caption = None, parse_mode = None, caption_entities = None, show_caption_above_media = None, has_spoiler = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • photo (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • show_caption_above_media (bool | None)

    • has_spoiler (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_poll(self, *, chat_id, question, options, business_connection_id = None, message_thread_id = None, question_parse_mode = None, question_entities = None, is_anonymous = None, type = None, allows_multiple_answers = None, correct_option_id = None, explanation = None, explanation_parse_mode = None, explanation_entities = None, open_period = None, close_date = None, is_closed = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • question (str)

    • options (list[alicebot.adapter.telegram.model.InputPollOption])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • question_parse_mode (str | None)

    • question_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • is_anonymous (bool | None)

    • type (str | None)

    • allows_multiple_answers (bool | None)

    • correct_option_id (int | None)

    • explanation (str | None)

    • explanation_parse_mode (str | None)

    • explanation_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • open_period (int | None)

    • close_date (int | None)

    • is_closed (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_sticker(self, *, chat_id, sticker, business_connection_id = None, message_thread_id = None, emoji = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • sticker (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • emoji (str | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_venue(self, *, chat_id, latitude, longitude, title, address, business_connection_id = None, message_thread_id = None, foursquare_id = None, foursquare_type = None, google_place_id = None, google_place_type = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • latitude (float)

    • longitude (float)

    • title (str)

    • address (str)

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • foursquare_id (str | None)

    • foursquare_type (str | None)

    • google_place_id (str | None)

    • google_place_type (str | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_video(self, *, chat_id, video, business_connection_id = None, message_thread_id = None, duration = None, width = None, height = None, thumbnail = None, cover = None, start_timestamp = None, caption = None, parse_mode = None, caption_entities = None, show_caption_above_media = None, has_spoiler = None, supports_streaming = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • video (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • duration (int | None)

    • width (int | None)

    • height (int | None)

    • thumbnail (Union[bytes, tuple[str, bytes], str, NoneType])

    • cover (Union[bytes, tuple[str, bytes], str, NoneType])

    • start_timestamp (int | None)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • show_caption_above_media (bool | None)

    • has_spoiler (bool | None)

    • supports_streaming (bool | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_video_note(self, *, chat_id, video_note, business_connection_id = None, message_thread_id = None, duration = None, length = None, thumbnail = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • video_note (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • duration (int | None)

    • length (int | None)

    • thumbnail (Union[bytes, tuple[str, bytes], str, NoneType])

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method send_voice(self, *, chat_id, voice, business_connection_id = None, message_thread_id = None, caption = None, parse_mode = None, caption_entities = None, duration = None, disable_notification = None, protect_content = None, allow_paid_broadcast = None, message_effect_id = None, reply_parameters = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • voice (Union[bytes, tuple[str, bytes], str])

    • business_connection_id (str | None)

    • message_thread_id (int | None)

    • caption (str | None)

    • parse_mode (str | None)

    • caption_entities (list[alicebot.adapter.telegram.model.MessageEntity] | None)

    • duration (int | None)

    • disable_notification (bool | None)

    • protect_content (bool | None)

    • allow_paid_broadcast (bool | None)

    • message_effect_id (str | None)

    • reply_parameters (alicebot.adapter.telegram.model.ReplyParameters | None)

    • reply_markup (Union[alicebot.adapter.telegram.model.InlineKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardMarkup, alicebot.adapter.telegram.model.ReplyKeyboardRemove, alicebot.adapter.telegram.model.ForceReply, NoneType])

  • Returns

    Type: alicebot.adapter.telegram.model.Message

async method set_business_account_bio(self, *, business_connection_id, bio = None)

  • Arguments

    • business_connection_id (str)

    • bio (str | None)

  • Returns

    Type: bool

async method set_business_account_gift_settings(self, *, business_connection_id, show_gift_button, accepted_gift_types)

  • Arguments

    • business_connection_id (str)

    • show_gift_button (bool)

    • accepted_gift_types (alicebot.adapter.telegram.model.AcceptedGiftTypes)

  • Returns

    Type: bool

async method set_business_account_name(self, *, business_connection_id, first_name, last_name = None)

  • Arguments

    • business_connection_id (str)

    • first_name (str)

    • last_name (str | None)

  • Returns

    Type: bool

async method set_business_account_profile_photo(self, *, business_connection_id, photo, is_public = None)

  • Arguments

    • business_connection_id (str)

    • photo (Union[alicebot.adapter.telegram.model.InputProfilePhotoStatic, alicebot.adapter.telegram.model.InputProfilePhotoAnimated])

    • is_public (bool | None)

  • Returns

    Type: bool

async method set_business_account_username(self, *, business_connection_id, username = None)

  • Arguments

    • business_connection_id (str)

    • username (str | None)

  • Returns

    Type: bool

async method set_chat_administrator_custom_title(self, *, chat_id, user_id, custom_title)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

    • custom_title (str)

  • Returns

    Type: bool

async method set_chat_description(self, *, chat_id, description = None)

  • Arguments

    • chat_id (Union[int, str])

    • description (str | None)

  • Returns

    Type: bool

async method set_chat_menu_button(self, *, chat_id = None, menu_button = None)

  • Arguments

    • chat_id (int | None)

    • menu_button (Union[alicebot.adapter.telegram.model.MenuButtonCommands, alicebot.adapter.telegram.model.MenuButtonWebApp, alicebot.adapter.telegram.model.MenuButtonDefault, NoneType])

  • Returns

    Type: bool

async method set_chat_permissions(self, *, chat_id, permissions, use_independent_chat_permissions = None)

  • Arguments

    • chat_id (Union[int, str])

    • permissions (alicebot.adapter.telegram.model.ChatPermissions)

    • use_independent_chat_permissions (bool | None)

  • Returns

    Type: bool

async method set_chat_photo(self, *, chat_id, photo)

  • Arguments

    • chat_id (Union[int, str])

    • photo (Union[bytes, tuple[str, bytes]])

  • Returns

    Type: bool

async method set_chat_sticker_set(self, *, chat_id, sticker_set_name)

  • Arguments

    • chat_id (Union[int, str])

    • sticker_set_name (str)

  • Returns

    Type: bool

async method set_chat_title(self, *, chat_id, title)

  • Arguments

    • chat_id (Union[int, str])

    • title (str)

  • Returns

    Type: bool

async method set_custom_emoji_sticker_set_thumbnail(self, *, name, custom_emoji_id = None)

  • Arguments

    • name (str)

    • custom_emoji_id (str | None)

  • Returns

    Type: bool

async method set_game_score(self, *, user_id, score, force = None, disable_edit_message = None, chat_id = None, message_id = None, inline_message_id = None)

  • Arguments

    • user_id (int)

    • score (int)

    • force (bool | None)

    • disable_edit_message (bool | None)

    • chat_id (int | None)

    • message_id (int | None)

    • inline_message_id (str | None)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.Message, bool]

async method set_message_reaction(self, *, chat_id, message_id, reaction = None, is_big = None)

  • Arguments

    • chat_id (Union[int, str])

    • message_id (int)

    • reaction (list[typing.Union[alicebot.adapter.telegram.model.ReactionTypeEmoji, alicebot.adapter.telegram.model.ReactionTypeCustomEmoji, alicebot.adapter.telegram.model.ReactionTypePaid]] | None)

    • is_big (bool | None)

  • Returns

    Type: bool

async method set_my_commands(self, *, commands, scope = None, language_code = None)

  • Arguments

    • commands (list[alicebot.adapter.telegram.model.BotCommand])

    • scope (Union[alicebot.adapter.telegram.model.BotCommandScopeDefault, alicebot.adapter.telegram.model.BotCommandScopeAllPrivateChats, alicebot.adapter.telegram.model.BotCommandScopeAllGroupChats, alicebot.adapter.telegram.model.BotCommandScopeAllChatAdministrators, alicebot.adapter.telegram.model.BotCommandScopeChat, alicebot.adapter.telegram.model.BotCommandScopeChatAdministrators, alicebot.adapter.telegram.model.BotCommandScopeChatMember, NoneType])

    • language_code (str | None)

  • Returns

    Type: bool

async method set_my_default_administrator_rights(self, *, rights = None, for_channels = None)

  • Arguments

    • rights (alicebot.adapter.telegram.model.ChatAdministratorRights | None)

    • for_channels (bool | None)

  • Returns

    Type: bool

async method set_my_description(self, *, description = None, language_code = None)

  • Arguments

    • description (str | None)

    • language_code (str | None)

  • Returns

    Type: bool

async method set_my_name(self, *, name = None, language_code = None)

  • Arguments

    • name (str | None)

    • language_code (str | None)

  • Returns

    Type: bool

async method set_my_short_description(self, *, short_description = None, language_code = None)

  • Arguments

    • short_description (str | None)

    • language_code (str | None)

  • Returns

    Type: bool

async method set_passport_data_errors(self, *, user_id, errors)

  • Arguments

    • user_id (int)

    • errors (list[typing.Union[alicebot.adapter.telegram.model.PassportElementErrorDataField, alicebot.adapter.telegram.model.PassportElementErrorFrontSide, alicebot.adapter.telegram.model.PassportElementErrorReverseSide, alicebot.adapter.telegram.model.PassportElementErrorSelfie, alicebot.adapter.telegram.model.PassportElementErrorFile, alicebot.adapter.telegram.model.PassportElementErrorFiles, alicebot.adapter.telegram.model.PassportElementErrorTranslationFile, alicebot.adapter.telegram.model.PassportElementErrorTranslationFiles, alicebot.adapter.telegram.model.PassportElementErrorUnspecified]])

  • Returns

    Type: bool

async method set_sticker_emoji_list(self, *, sticker, emoji_list)

  • Arguments

    • sticker (str)

    • emoji_list (list[str])

  • Returns

    Type: bool

async method set_sticker_keywords(self, *, sticker, keywords = None)

  • Arguments

    • sticker (str)

    • keywords (list[str] | None)

  • Returns

    Type: bool

async method set_sticker_mask_position(self, *, sticker, mask_position = None)

  • Arguments

    • sticker (str)

    • mask_position (alicebot.adapter.telegram.model.MaskPosition | None)

  • Returns

    Type: bool

async method set_sticker_position_in_set(self, *, sticker, position)

  • Arguments

    • sticker (str)

    • position (int)

  • Returns

    Type: bool

async method set_sticker_set_thumbnail(self, *, name, user_id, format, thumbnail = None)

  • Arguments

    • name (str)

    • user_id (int)

    • format (str)

    • thumbnail (Union[bytes, tuple[str, bytes], str, NoneType])

  • Returns

    Type: bool

async method set_sticker_set_title(self, *, name, title)

  • Arguments

    • name (str)

    • title (str)

  • Returns

    Type: bool

async method set_user_emoji_status(self, *, user_id, emoji_status_custom_emoji_id = None, emoji_status_expiration_date = None)

  • Arguments

    • user_id (int)

    • emoji_status_custom_emoji_id (str | None)

    • emoji_status_expiration_date (int | None)

  • Returns

    Type: bool

async method set_webhook(self, *, url, certificate = None, ip_address = None, max_connections = None, allowed_updates = None, drop_pending_updates = None, secret_token = None)

  • Arguments

    • url (str)

    • certificate (Union[bytes, tuple[str, bytes], NoneType])

    • ip_address (str | None)

    • max_connections (int | None)

    • allowed_updates (list[str] | None)

    • drop_pending_updates (bool | None)

    • secret_token (str | None)

  • Returns

    Type: bool

async method stop_message_live_location(self, *, business_connection_id = None, chat_id = None, message_id = None, inline_message_id = None, reply_markup = None)

  • Arguments

    • business_connection_id (str | None)

    • chat_id (Union[int, str, NoneType])

    • message_id (int | None)

    • inline_message_id (str | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: Union[alicebot.adapter.telegram.model.Message, bool]

async method stop_poll(self, *, chat_id, message_id, business_connection_id = None, reply_markup = None)

  • Arguments

    • chat_id (Union[int, str])

    • message_id (int)

    • business_connection_id (str | None)

    • reply_markup (alicebot.adapter.telegram.model.InlineKeyboardMarkup | None)

  • Returns

    Type: alicebot.adapter.telegram.model.Poll

async method transfer_business_account_stars(self, *, business_connection_id, star_count)

  • Arguments

    • business_connection_id (str)

    • star_count (int)

  • Returns

    Type: bool

async method transfer_gift(self, *, business_connection_id, owned_gift_id, new_owner_chat_id, star_count = None)

  • Arguments

    • business_connection_id (str)

    • owned_gift_id (str)

    • new_owner_chat_id (int)

    • star_count (int | None)

  • Returns

    Type: bool

async method unban_chat_member(self, *, chat_id, user_id, only_if_banned = None)

  • Arguments

    • chat_id (Union[int, str])

    • user_id (int)

    • only_if_banned (bool | None)

  • Returns

    Type: bool

async method unban_chat_sender_chat(self, *, chat_id, sender_chat_id)

  • Arguments

    • chat_id (Union[int, str])

    • sender_chat_id (int)

  • Returns

    Type: bool

async method unhide_general_forum_topic(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method unpin_all_chat_messages(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method unpin_all_forum_topic_messages(self, *, chat_id, message_thread_id)

  • Arguments

    • chat_id (Union[int, str])

    • message_thread_id (int)

  • Returns

    Type: bool

async method unpin_all_general_forum_topic_messages(self, *, chat_id)

  • Arguments

    • chat_id (Union[int, str])
  • Returns

    Type: bool

async method unpin_chat_message(self, *, chat_id, business_connection_id = None, message_id = None)

  • Arguments

    • chat_id (Union[int, str])

    • business_connection_id (str | None)

    • message_id (int | None)

  • Returns

    Type: bool

async method upgrade_gift(self, *, business_connection_id, owned_gift_id, keep_original_details = None, star_count = None)

  • Arguments

    • business_connection_id (str)

    • owned_gift_id (str)

    • keep_original_details (bool | None)

    • star_count (int | None)

  • Returns

    Type: bool

async method upload_sticker_file(self, *, user_id, sticker, sticker_format)

  • Arguments

    • user_id (int)

    • sticker (Union[bytes, tuple[str, bytes]])

    • sticker_format (str)

  • Returns

    Type: alicebot.adapter.telegram.model.File

async method verify_chat(self, *, chat_id, custom_description = None)

  • Arguments

    • chat_id (Union[int, str])

    • custom_description (str | None)

  • Returns

    Type: bool

async method verify_user(self, *, user_id, custom_description = None)

  • Arguments

    • user_id (int)

    • custom_description (str | None)

  • Returns

    Type: bool

Released under the MIT License.