import asyncio import functools import io import unicodedata import aiohttp import discord from redbot.core import commands, checks from typing import Literal class EveryoneEmoji(commands.Cog): """Allows anyone to use all emojis the bot can see!""" def __init__(self, bot): self.bot = bot self.session = aiohttp.ClientSession() def cog_unload(self): self.bot.loop.create_task(self.session.close()) @commands.command(name="e") async def emoji_send(self, ctx, emoji: str): """Post emoji. Emoji can be animated or not. Even if you don't have nitro, you can send emojis! If you have nitro, you can send emojis from many server you are in! If you normally can't use the emoji (don't have nitro) then you can use any emoji in **this server** using :emoji_name: and it will send. To send emojis from other servers without nitro, you need the **emoji ID**. then use [p]e Make sure the bot has manage message permissions for cleaner chat """ # just pass if failing to delete message, it should still run even if don't have manage # message permissions. try: await ctx.message.delete() except: pass if (emoji[0:2] == "<:" or emoji[0:2] == "": # custom Emoji name = emoji.split(":")[1] emoji_name = emoji.split(":")[2][:-1] if emoji.split(":")[0] == "