Skip to content

Commit d1417e5

Browse files
Added the field web_app_name to the class WriteAccessAllowed.
1 parent a7cafd1 commit d1417e5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

telebot/types.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7396,13 +7396,20 @@ class WriteAccessAllowed(JsonDeserializable):
73967396
Currently holds no information.
73977397
73987398
Telegram documentation: https://core.telegram.org/bots/api#writeaccessallowed
7399+
7400+
:param web_app_name: Optional. Name of the Web App which was launched from a link
7401+
:type web_app_name: :obj:`str`
73997402
"""
74007403
@classmethod
74017404
def de_json(cls, json_string):
7402-
return cls()
7405+
if json_string is None: return None
7406+
obj = cls.check_json(json_string)
7407+
return cls(**obj)
7408+
74037409

7404-
def __init__(self) -> None:
7405-
pass
7410+
def __init__(self, web_app_name: str) -> None:
7411+
self.web_app_name: str = web_app_name
7412+
74067413

74077414

74087415
class UserShared(JsonDeserializable):

0 commit comments

Comments
 (0)