From d1417e561676bbef7ebe536747a669e4aacc93c6 Mon Sep 17 00:00:00 2001 From: coder2020official Date: Fri, 21 Apr 2023 22:14:16 +0400 Subject: [PATCH] Added the field web_app_name to the class WriteAccessAllowed. --- telebot/types.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/telebot/types.py b/telebot/types.py index 22d46c9..fed442c 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -7396,13 +7396,20 @@ class WriteAccessAllowed(JsonDeserializable): Currently holds no information. Telegram documentation: https://core.telegram.org/bots/api#writeaccessallowed + + :param web_app_name: Optional. Name of the Web App which was launched from a link + :type web_app_name: :obj:`str` """ @classmethod def de_json(cls, json_string): - return cls() + if json_string is None: return None + obj = cls.check_json(json_string) + return cls(**obj) + - def __init__(self) -> None: - pass + def __init__(self, web_app_name: str) -> None: + self.web_app_name: str = web_app_name + class UserShared(JsonDeserializable):