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 aa6e0d7590 - Show all commits

View file

@ -5,7 +5,7 @@ import aiohttp
import discord import discord
from colorthief import ColorThief from colorthief import ColorThief
from red_commons.logging import RedTraceLogger, getLogger from red_commons.logging import RedTraceLogger, getLogger
from redbot.core import commands from redbot.core import app_commands, commands
from redbot.core.bot import Red from redbot.core.bot import Red
from redbot.core.utils.chat_formatting import bold, humanize_list from redbot.core.utils.chat_formatting import bold, humanize_list
@ -17,7 +17,7 @@ class EmojiInfo(commands.Cog):
__author__: list[str] = ["SeaswimmerTheFsh"] __author__: list[str] = ["SeaswimmerTheFsh"]
__version__: str = "1.0.0" __version__: str = "1.0.0"
__documentation__: str = "https://seacogs.coastalcommits.com/emoji/" __documentation__: str = "https://seacogs.coastalcommits.com/emojiinfo/"
def __init__(self, bot: Red) -> None: def __init__(self, bot: Red) -> None:
super().__init__() super().__init__()
@ -54,6 +54,10 @@ class EmojiInfo(commands.Cog):
return color return color
@commands.hybrid_command(name="emoji") @commands.hybrid_command(name="emoji")
@app_commands.describe(
emoji="What emoji would you like to get information on?",
ephemeral="Would you like the response to be hidden?"
)
async def emoji(self, ctx: commands.Context, emoji: str, ephemeral: bool = False) -> None: async def emoji(self, ctx: commands.Context, emoji: str, ephemeral: bool = False) -> None:
"""Retrieve information about an emoji.""" """Retrieve information about an emoji."""
await ctx.defer(ephemeral=ephemeral) await ctx.defer(ephemeral=ephemeral)