diff --git a/README.md b/README.md index ccfe3b8..1612bb6 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ | moderation | `kick`, `ban`, `nick`, `purge`, `hackban`, `warnings`, `archive` | | sidestore | `sidestore`, `refresh`, `code`, `crash`, `pairing`, `server`, `half`, `sparse`, `afc`, `udid` | | idevice | `idevice`, `noapps`, `errorcode`, `developermode`, `mountddi` | -| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask` | +| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask`, `support`| | utilities | `translate` | ## Download diff --git a/cogs/miscellaneous/__init__.py b/cogs/miscellaneous/__init__.py index 2467edb..0827977 100644 --- a/cogs/miscellaneous/__init__.py +++ b/cogs/miscellaneous/__init__.py @@ -8,6 +8,7 @@ from .labubu import labubu_command from .tryitandsee import tryitandsee_command from .piracy import piracy_command from .keanu import keanu_command +from .support import support_command class Miscellaneous(commands.GroupCog, name="misc"): def __init__(self, bot) -> None: @@ -22,7 +23,7 @@ class Miscellaneous(commands.GroupCog, name="misc"): color=0x7289DA ) embed.set_author(name="Miscellaneous", icon_url="https://yes.nighty.works/raw/YxMC0r.png") - embed.add_field(name="Available", value="dontasktoask, rr, labubu, tryitandsee, piracy, keanu", inline=False) + embed.add_field(name="Available", value="dontasktoask, rr, labubu, tryitandsee, piracy, keanu, support", inline=False) await context.send(embed=embed) async def _invoke_hybrid(self, context: Context, name: str): @@ -66,6 +67,10 @@ class Miscellaneous(commands.GroupCog, name="misc"): async def miscellaneous_group_keanu(self, context: Context): await self._invoke_hybrid(context, "keanu") + @miscellaneous_group.command(name="support") + async def miscellaneous_group_support(self, context: Context): + await self._invoke_hybrid(context, "support") + @commands.check(_require_group_prefix) @commands.hybrid_command( name="dontasktoask", @@ -114,6 +119,14 @@ class Miscellaneous(commands.GroupCog, name="misc"): async def keanu(self, context): return await keanu_command()(self, context) + @commands.check(_require_group_prefix) + @commands.hybrid_command( + name="support", + description="Support?" + ) + async def support(self, context): + return await support_command()(self, context) + async def setup(bot) -> None: cog = Miscellaneous(bot) await bot.add_cog(cog) @@ -124,3 +137,4 @@ async def setup(bot) -> None: bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'") bot.logger.info("Loaded extension 'miscellaneous.piracy'") bot.logger.info("Loaded extension 'miscellaneous.keanu'") + bot.logger.info("Loaded extension 'miscellaneous.support'") diff --git a/cogs/miscellaneous/support.py b/cogs/miscellaneous/support.py new file mode 100644 index 0000000..725bfd5 --- /dev/null +++ b/cogs/miscellaneous/support.py @@ -0,0 +1,26 @@ +import discord +from discord.ext import commands +from discord.ext.commands import Context + +def support_command(): + @commands.hybrid_command( + name="support", + description="Shows the support image." + ) + async def support(self, context): + embed = discord.Embed( + color=0x7289DA + ) + embed.set_author(name="Support", icon_url="https://yes.nighty.works/raw/YxMC0r.png") + embed.set_image(url="https://yes.nighty.works/raw/X8XeCV.png") + + if getattr(context, "interaction", None): + inter = context.interaction + if not inter.response.is_done(): + await inter.response.send_message(embed=embed, ephemeral=False) + else: + await inter.followup.send(embed=embed, ephemeral=True) + else: + await context.send(embed=embed) + + return support