From 6b7e5dcd1aa498795a2db6ae6b012ebb6aee2a5c Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 14 Aug 2022 10:46:48 +0200 Subject: [PATCH] Fix sending custom emoji --- pyrogram/types/messages_and_media/message_entity.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/messages_and_media/message_entity.py b/pyrogram/types/messages_and_media/message_entity.py index ac14b621..d2bf654d 100644 --- a/pyrogram/types/messages_and_media/message_entity.py +++ b/pyrogram/types/messages_and_media/message_entity.py @@ -112,8 +112,9 @@ class MessageEntity(Object): if self.language is None: args.pop("language") - if self.custom_emoji_id is None: - args.pop("custom_emoji_id") + args.pop("custom_emoji_id") + if self.custom_emoji_id is not None: + args["document_id"] = self.custom_emoji_id entity = self.type.value