aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/evergreen/emoji_count.py29
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))