Contents Menu Expand Light mode Dark mode Auto light/dark mode
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
python-telegram-bot
v20.3
Logo
python-telegram-bot
v20.3

Reference

  • telegram package
    • Bot
    • Available Types
      • Animation
      • Audio
      • BotCommand
      • BotCommandScope
      • BotCommandScopeAllChatAdministrators
      • BotCommandScopeAllGroupChats
      • BotCommandScopeAllPrivateChats
      • BotCommandScopeChat
      • BotCommandScopeChatAdministrators
      • BotCommandScopeChatMember
      • BotCommandScopeDefault
      • BotDescription
      • BotName
      • BotShortDescription
      • CallbackQuery
      • Chat
      • ChatAdministratorRights
      • ChatInviteLink
      • ChatJoinRequest
      • ChatLocation
      • ChatMember
      • ChatMemberAdministrator
      • ChatMemberBanned
      • ChatMemberLeft
      • ChatMemberMember
      • ChatMemberOwner
      • ChatMemberRestricted
      • ChatMemberUpdated
      • ChatPermissions
      • ChatPhoto
      • ChatShared
      • Contact
      • Dice
      • Document
      • File
      • ForceReply
      • ForumTopic
      • ForumTopicClosed
      • ForumTopicCreated
      • ForumTopicEdited
      • ForumTopicReopened
      • GeneralForumTopicHidden
      • GeneralForumTopicUnhidden
      • InlineKeyboardButton
      • InlineKeyboardMarkup
      • InputFile
      • InputMedia
      • InputMediaAnimation
      • InputMediaAudio
      • InputMediaDocument
      • InputMediaPhoto
      • InputMediaVideo
      • InputSticker
      • KeyboardButton
      • KeyboardButtonPollType
      • KeyboardButtonRequestChat
      • KeyboardButtonRequestUser
      • Location
      • LoginUrl
      • MenuButton
      • MenuButtonCommands
      • MenuButtonDefault
      • MenuButtonWebApp
      • Message
      • MessageAutoDeleteTimerChanged
      • MessageEntity
      • MessageId
      • PhotoSize
      • Poll
      • PollAnswer
      • PollOption
      • ProximityAlertTriggered
      • ReplyKeyboardMarkup
      • ReplyKeyboardRemove
      • SentWebAppMessage
      • SwitchInlineQueryChosenChat
      • TelegramObject
      • Update
      • User
      • UserProfilePhotos
      • UserShared
      • Venue
      • Video
      • VideoChatEnded
      • VideoChatParticipantsInvited
      • VideoChatScheduled
      • VideoChatStarted
      • VideoNote
      • Voice
      • WebAppData
      • WebAppInfo
      • WebhookInfo
      • WriteAccessAllowed
    • Stickers
      • MaskPosition
      • Sticker
      • StickerSet
    • Inline Mode
      • ChosenInlineResult
      • InlineQuery
      • InlineQueryResult
      • InlineQueryResultArticle
      • InlineQueryResultAudio
      • InlineQueryResultCachedAudio
      • InlineQueryResultCachedDocument
      • InlineQueryResultCachedGif
      • InlineQueryResultCachedMpeg4Gif
      • InlineQueryResultCachedPhoto
      • InlineQueryResultCachedSticker
      • InlineQueryResultCachedVideo
      • InlineQueryResultCachedVoice
      • InlineQueryResultContact
      • InlineQueryResultDocument
      • InlineQueryResultGame
      • InlineQueryResultGif
      • InlineQueryResultLocation
      • InlineQueryResultMpeg4Gif
      • InlineQueryResultPhoto
      • InlineQueryResultsButton
      • InlineQueryResultVenue
      • InlineQueryResultVideo
      • InlineQueryResultVoice
      • InputMessageContent
      • InputTextMessageContent
      • InputLocationMessageContent
      • InputVenueMessageContent
      • InputContactMessageContent
      • InputInvoiceMessageContent
    • Payments
      • Invoice
      • LabeledPrice
      • OrderInfo
      • PreCheckoutQuery
      • ShippingAddress
      • ShippingOption
      • ShippingQuery
      • SuccessfulPayment
    • Games
      • Callbackgame
      • Game
      • GameHighScore
    • Passport
      • Credentials
      • DataCredentials
      • EncryptedCredentials
      • EncryptedPassportElement
      • FileCredentials
      • IdDocumentData
      • PassportData
      • PassportElementError
      • PassportElementErrorDataField
      • PassportElementErrorFile
      • PassportElementErrorFiles
      • PassportElementErrorFrontSide
      • PassportElementErrorReverseSide
      • PassportElementErrorSelfie
      • PassportElementErrorTranslationFile
      • PassportElementErrorTranslationFiles
      • PassportElementErrorUnspecified
      • PassportFile
      • PersonalDetails
      • ResidentialAddress
      • SecureData
      • SecureValue
  • telegram.ext package
    • Application
    • ApplicationBuilder
    • ApplicationHandlerStop
    • CallbackContext
    • ContextTypes
    • Defaults
    • ExtBot
    • Job
    • JobQueue
    • Updater
    • Handlers
      • BaseHandler
      • CallbackQueryHandler
      • ChatJoinRequestHandler
      • ChatMemberHandler
      • ChosenInlineResultHandler
      • CommandHandler
      • ConversationHandler
      • filters Module
      • InlineQueryHandler
      • MessageHandler
      • PollAnswerHandler
      • PollHandler
      • PreCheckoutQueryHandler
      • PrefixHandler
      • ShippingQueryHandler
      • StringCommandHandler
      • StringRegexHandler
      • TypeHandler
    • Persistence
      • BasePersistence
      • DictPersistence
      • PersistenceInput
      • PicklePersistence
    • Arbitrary Callback Data
      • CallbackDataCache
      • InvalidCallbackData
    • Rate Limiting
      • BaseRateLimiter
      • AIORateLimiter
  • Auxiliary modules
    • telegram.constants Module
    • telegram.error Module
    • telegram.helpers Module
    • telegram.request Module
      • BaseRequest
      • RequestData
      • HTTPXRequest
    • telegram.warnings Module
  • Telegrams Bot API Docs

Resources

  • Examples
    • arbitrarycallbackdatabot.py
    • chatmemberbot.py
    • contexttypesbot.py
    • conversationbot.py
    • conversationbot2.py
    • customwebhookbot.py
    • deeplinking.py
    • echobot.py
    • errorhandlerbot.py
    • inlinebot.py
    • inlinekeyboard.py
    • inlinekeyboard2.py
    • nestedconversationbot.py
    • passportbot.py
    • paymentbot.py
    • persistentconversationbot.py
    • pollbot.py
    • rawapibot.py
    • timerbot.py
    • webappbot.py
  • Wiki

Project

  • Stability Policy
  • Changelog
  • Contributor Covenant Code of Conduct
  • How To Contribute
  • Testing in PTB
  • Website
  • GitHub Repository
  • Telegram Channel
  • Telegram User Group
  v: stable
Versions
latest
stable
v20.3
v20.2
v20.1
v20.0
v20.0b0
v20.0a6
v20.0a5
v20.0a4
v20.0a3
v20.0a2
v20.0a1
v20.0a0
v13.15
v13.14
v13.13
v13.12
v13.11
v13.10
v13.9
v13.8.1
v13.8
v13.7
v13.6
v13.5
v13.4.1
v13.4
v13.3
v13.2
v13.1
v13.0
v12.8
v12.7
v12.6.1
v12.6
v12.5.1
v12.5
v12.4.2
v12.4.1
v12.4.0
v12.3.0
v12.2.0
v12.1.1
v12.1.0
v12.0.0
v12.0.0b1
doc-fixes
Downloads
pdf
On Read the Docs
Project Home
Builds
Back to top
Edit this page

MenuButtonWebApp¶

class telegram.MenuButtonWebApp(text, web_app, *, api_kwargs=None)[source]¶

Bases: telegram.MenuButton

Represents a menu button, which launches a Web App.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their type, text and web_app are equal.

Use In

telegram.Bot.set_chat_menu_button()

Returned In

telegram.Bot.get_chat_menu_button()

New in version 20.0.

Parameters:
  • text (str) – Text of the button.

  • web_app (telegram.WebAppInfo) – Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery() of Bot.

type[source]¶

'web_app'.

Type:

str

text[source]¶

Text of the button.

Type:

str

web_app[source]¶

Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery() of Bot.

Type:

telegram.WebAppInfo

classmethod de_json(data, bot)[source]¶

See telegram.TelegramObject.de_json().

Next
Message
Previous
MenuButtonDefault
Copyright © 2015-2023, Leandro Toledo
Made with Sphinx and @pradyunsg's Furo
On this page
  • MenuButtonWebApp
    • MenuButtonWebApp
      • MenuButtonWebApp.type
      • MenuButtonWebApp.text
      • MenuButtonWebApp.web_app
      • MenuButtonWebApp.de_json()