renamed emoji to emojiinfo
This commit is contained in:
parent
8fdf587bde
commit
20c3007306
4 changed files with 6 additions and 6 deletions
5
emojiinfo/__init__.py
Normal file
5
emojiinfo/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from .emojiinfo import EmojiInfo
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(EmojiInfo(bot))
|
36
emojiinfo/emojiinfo.py
Normal file
36
emojiinfo/emojiinfo.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
from typing import Any, Literal
|
||||
|
||||
import discord
|
||||
from red_commons.logging import RedTraceLogger, getLogger
|
||||
from redbot.core import commands
|
||||
from redbot.core.bot import Red
|
||||
from redbot.core.utils.chat_formatting import humanize_list
|
||||
|
||||
|
||||
class EmojiInfo(commands.cog):
|
||||
"""Retrieve information about emojis."""
|
||||
|
||||
__author__: list[str] = ["SeaswimmerTheFsh"]
|
||||
__version__: str = "1.0.0"
|
||||
__documentation__: str = "https://seacogs.coastalcommits.com/emoji/"
|
||||
|
||||
def __init__(self, bot: Red) -> None:
|
||||
super().__init__()
|
||||
self.bot: Red = bot
|
||||
self.logger: RedTraceLogger = getLogger(name="red.SeaCogs.Emoji")
|
||||
|
||||
def format_help_for_context(self, ctx: commands.Context) -> str:
|
||||
pre_processed: Any | Literal[''] = super().format_help_for_context(ctx) or ""
|
||||
n: Literal['\n'] | Literal[''] = "\n" if "\n\n" not in pre_processed else ""
|
||||
text: list[str] = [
|
||||
f"{pre_processed}{n}",
|
||||
f"Cog Version: **{self.__version__}**",
|
||||
f"Author: {humanize_list(items=self.__author__)}",
|
||||
f"Documentation: {self.__documentation__}",
|
||||
]
|
||||
return "\n".join(text)
|
||||
|
||||
@commands.hybrid_command(name="emoji")
|
||||
async def emoji(self, ctx: commands.Context, emoji: discord.Emoji, ephemeral: bool = False) -> None:
|
||||
"""Retrieve information about an emoji."""
|
||||
await ctx.send(content=f"Emoji: {emoji}", ephemeral=ephemeral)
|
16
emojiinfo/info.json
Normal file
16
emojiinfo/info.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"author" : ["SeaswimmerTheFsh (seasw.)"],
|
||||
"install_msg" : "Thank you for installing Emoji!",
|
||||
"name" : "Emoji",
|
||||
"short" : "Retrieve information about emojis.",
|
||||
"description" : "Retrieve information about emojis.",
|
||||
"end_user_data_statement" : "This cog does not store end user data.",
|
||||
"hidden": false,
|
||||
"disabled": false,
|
||||
"min_bot_version": "3.5.0",
|
||||
"min_python_version": [3, 10, 0],
|
||||
"requirements": ["pillow"],
|
||||
"tags": [
|
||||
"utility"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue