Skip to content

Commit

Permalink
Add /jumbo command
Browse files Browse the repository at this point in the history
  • Loading branch information
stekc committed Sep 25, 2024
1 parent 040c942 commit 68cd74b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cogs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ async def steal(self, context: Context, emoji: str, name: str = None) -> None:
f"Emoji <{'a' if e.animated else ''}:{e.name}:{e.id}> `:{e.name}:` was added."
)

@commands.hybrid_command(
name="jumbo",
description="Enlarge an emoji.",
)
@app_commands.describe(emoji="Discord emoji.")
async def jumbo(self, context: Context, emoji: str) -> None:
get_emoji = discord.PartialEmoji.from_str(emoji)
if not get_emoji.id:
return await context.send("You must provide a valid emoji.", ephemeral=True)

url = f"https://cdn.discordapp.com/emojis/{get_emoji.id}.{('gif' if get_emoji.animated else 'png')}"
embed = discord.Embed(
color=await get_color(url),
)
embed.set_image(url=url)
await context.send(embed=embed)

@commands.hybrid_command(
name="info",
description="View information about the bot.",
Expand Down

0 comments on commit 68cd74b

Please sign in to comment.