Skip to content

Fix GiftBackground.de_json - #2614

Merged
Badiboy merged 2 commits into
eternnoir:masterfrom
Badiboy:master
Aug 15, 2026
Merged

Fix GiftBackground.de_json#2614
Badiboy merged 2 commits into
eternnoir:masterfrom
Badiboy:master

Conversation

@Badiboy

@Badiboy Badiboy commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix GiftBackground.de_json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes JSON deserialization support for the GiftBackground Telegram Bot API type by adding a missing de_json implementation in telebot/types.py.

Changes:

  • Added GiftBackground.de_json to properly deserialize from a JSON string/dict into a GiftBackground instance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread telebot/types.py
Comment on lines +14000 to +14002
return cls(**obj)


Comment thread telebot/types.py
Comment on lines +13996 to +14000
@classmethod
def de_json(cls, json_string):
if json_string is None: return None
obj = cls.check_json(json_string)
return cls(**obj)
@Badiboy
Badiboy merged commit 21f8833 into eternnoir:master Aug 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants