Add EmojiInfo cog #27

Merged
cswimr merged 27 commits from emoji into main 2024-05-08 16:07:30 -04:00
Showing only changes of commit 537b2edafa - Show all commits

View file

@ -59,7 +59,10 @@ class EmojiInfo(commands.Cog):
emoji: discord.PartialEmoji = discord.PartialEmoji.from_str(value=emoji) emoji: discord.PartialEmoji = discord.PartialEmoji.from_str(value=emoji)
if emoji.is_unicode_emoji(): if emoji.is_unicode_emoji():
try:
emoji_url = await self.fetch_twemoji(unicode_emoji=emoji.name) emoji_url = await self.fetch_twemoji(unicode_emoji=emoji.name)
except Exception:
await ctx.send("Please provide a valid emoji!", ephemeral=ephemeral)
else: else:
emoji_url = emoji.url emoji_url = emoji.url