WriteAccessAllowed

class pyrogram.types.WriteAccessAllowed[source]

This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess, or about a user being invited to the private chat with the bot by the owner of the bot.

Parameters:
  • from_request (bool, optional) – True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess

  • web_app_name (str, optional) – Name of the Web App, if the access was granted when the Web App was launched from a link

  • from_attachment_menu (bool, optional) – True, if the access was granted when the bot was added to the attachment or side menu

  • inviter (User, optional) – The owner of the bot, if the access was granted when the owner invited the user to the private chat with the bot. Bot owners can invite up to 10 users at once by opening the link https://t.me/botinvite/<bot_username>.