From 0985653a7590da3cd26bf5c84bbe4ad48e0d3265 Mon Sep 17 00:00:00 2001 From: iwumingz Date: Mon, 11 Apr 2022 21:19:45 +0800 Subject: [PATCH] Fix custom emoji logic --- tools/stickers.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/stickers.py b/tools/stickers.py index 50dac31..fb60697 100644 --- a/tools/stickers.py +++ b/tools/stickers.py @@ -94,14 +94,13 @@ class StickerAdder: await self.__wait_for() async def send_emoji(self) -> None: - if self._msg.reply_to_message.sticker: + _, arg = Parameters.get(self._msg) + if emoji.is_emoji(arg): + an_emoji = arg + elif self._msg.reply_to_message.sticker: an_emoji = self._msg.reply_to_message.sticker.emoji else: - _, arg = Parameters.get(self._msg) - if emoji.is_emoji(arg): - an_emoji = arg - else: - an_emoji = '⚡️' + an_emoji = '⚡️' await self.send_message(an_emoji) async def send_retries(self, n: int) -> None: