Fix custom emoji logic

This commit is contained in:
iwumingz 2022-04-11 21:19:45 +08:00
parent 07ee720063
commit 0985653a75

View File

@ -94,12 +94,11 @@ class StickerAdder:
await self.__wait_for()
async def send_emoji(self) -> None:
if 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
elif self._msg.reply_to_message.sticker:
an_emoji = self._msg.reply_to_message.sticker.emoji
else:
an_emoji = '⚡️'
await self.send_message(an_emoji)