From 88a0b20e8d1e412f7bea0cb61bc57b7dfb2f372c Mon Sep 17 00:00:00 2001 From: Badiboy Date: Sat, 15 Aug 2026 21:46:51 +0300 Subject: [PATCH 1/2] Fix GiftBackground.de_json --- telebot/types.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/telebot/types.py b/telebot/types.py index f67afed7d..332640e48 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -13993,6 +13993,13 @@ def __init__(self, center_color: int, edge_color: int, text_color: int, **kwargs self.edge_color: int = edge_color self.text_color: int = text_color + @classmethod + def de_json(cls, json_string): + if json_string is None: return None + obj = cls.check_json(json_string) + return cls(**obj) + + class SuggestedPostApprovalFailed(JsonDeserializable): """ Describes a service message about the failed approval of a suggested post. From c7cb174622f70ccbc49912cb91c939065b6e1681 Mon Sep 17 00:00:00 2001 From: Badiboy Date: Sat, 15 Aug 2026 21:56:46 +0300 Subject: [PATCH 2/2] Line fix --- telebot/types.py | 1 - 1 file changed, 1 deletion(-) diff --git a/telebot/types.py b/telebot/types.py index 332640e48..4056112ec 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -13998,7 +13998,6 @@ def de_json(cls, json_string): if json_string is None: return None obj = cls.check_json(json_string) return cls(**obj) - class SuggestedPostApprovalFailed(JsonDeserializable): """