From edc3e45e87885954b9b6bcc7fcfee4a784526c59 Mon Sep 17 00:00:00 2001 From: Mayor joy <76117511+JanChing6@users.noreply.github.com> Date: Tue, 1 Mar 2022 01:49:50 +0530 Subject: [PATCH] Add RandomEmoji Plugin (#235) * Add files via upload * Update requirements.txt Co-authored-by: Yamin Karnu <76117511+SantaYamin@users.noreply.github.com> --- plugins/randomemoji.py | 25 +++++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 26 insertions(+) create mode 100644 plugins/randomemoji.py diff --git a/plugins/randomemoji.py b/plugins/randomemoji.py new file mode 100644 index 000000000..d6b3733d9 --- /dev/null +++ b/plugins/randomemoji.py @@ -0,0 +1,25 @@ +""" +GET random emoji in Image Format. +Usage - .randomemoji. +""" + +# By - SantaYamin aka Nikola.N + +import os + +from multiutility import EmojiCreator +from userge import Message, userge + +Emoji = EmojiCreator() + + +@userge.on_cmd( + "randomemoji", + about={"header": "Get a Random Emoji in Image Format", "usage": "{tr}randomemoji"}, +) +async def app(message: Message): + msg_ = await message.edit("Generating RaNDOmEMoJi for YoU...") + emoji = Emoji.get_random() + await msg_.reply_photo(emoji, caption="**---- Random Emoji ----**", quote=False) + os.remove(emoji) + await msg_.delete() diff --git a/requirements.txt b/requirements.txt index 7e86378d6..408cc0129 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ gtts humanize justwatch lottie +multiutility newspaper3k psutil pydub