diff options
| author | 2020-10-01 13:44:09 +0530 | |
|---|---|---|
| committer | 2020-10-01 13:44:09 +0530 | |
| commit | 8f5494727d81be7190537f130ef9b384c9e72285 (patch) | |
| tree | 9cbe4c6d0d6d3d0e0ec24e2d7016c141f5159a68 | |
| parent | Merge branch 'master' into master (diff) | |
inital commit
| -rw-r--r-- | bot/exts/evergreen/emoji_count.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bot/exts/evergreen/emoji_count.py b/bot/exts/evergreen/emoji_count.py new file mode 100644 index 00000000..b619f349 --- /dev/null +++ b/bot/exts/evergreen/emoji_count.py @@ -0,0 +1,29 @@ +import logging + +from discord.ext import commands + +log = logging.getLogger(__name__) + + +class EmojiCount(commands.Cog): + """Command that give random emoji based on category.""" + + def __init__(self, bot: commands.Bot): + self.bot = bot + + @commands.command(name="ec") + async def ec(self, ctx, emoj: str): + """Returns embed with emoji category and info given by user.""" + emoji = [] + for a in ctx.guild.emojis: + for n in a.name.split('_'): + if len(n) == 1: + pass + elif n.name[0] == emoji.lower(): + emoji.append(a) + await ctx.send(emoji) + + +def setup(bot: commands.Bot) -> None: + """Emoji Count Cog load.""" + bot.add_cog(EmojiCount(bot)) |