WriteAccessAllowed

class telegram.WriteAccessAllowed(web_app_name=None, from_request=None, from_attachment_menu=None, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

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.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their web_app_name is equal.

New in version 20.0.

Changed in version 20.6: Added custom equality comparison for objects of this class.

Parameters:
  • web_app_name (str, optional) –

    Name of the Web App, if the access was granted when the Web App was launched from a link.

    New in version 20.3.

  • 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.

    New in version 20.6.

  • from_attachment_menu (bool, optional) –

    True, if the access was granted when the bot was added to the attachment or side menu.

    New in version 20.6.

web_app_name[source]

Optional. Name of the Web App, if the access was granted when the Web App was launched from a link.

New in version 20.3.

Type:

str

from_request[source]

Optional. True, if the access was granted after the user accepted an explicit request from a Web App.

New in version 20.6.

Type:

bool

from_attachment_menu[source]

Optional. True, if the access was granted when the bot was added to the attachment or side menu.

New in version 20.6.

Type:

bool