From 9c7359906c443e7c382310c88beb6d45e7bf6def Mon Sep 17 00:00:00 2001 From: neoarz Date: Mon, 6 Oct 2025 21:25:14 -0400 Subject: [PATCH] feat(depart): new command :) (requested by jackson) --- README.md | 2 +- cogs/miscellaneous/__init__.py | 16 +++++++++++++++- cogs/miscellaneous/depart.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 cogs/miscellaneous/depart.py diff --git a/README.md b/README.md index b05cec9..49d3d05 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ | sidestore | `help`, `refresh`, `code`, `crash`, `pairing`, `server`, `half`, `sparse`, `afc`, `udid` | | idevice | `help`, `noapps`, `errorcode`, `developermode`, `mountddi` | | melonx | `help`, `transfer`, `mods`, `gamecrash`, `requirements`, `error`, `26` | -| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask`, `support`| +| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask`, `support`, `depart`| | utilities | `translate`, `codepreview`, `dictionary` | | media | `download`, `mcquote`, `img2gif` | diff --git a/cogs/miscellaneous/__init__.py b/cogs/miscellaneous/__init__.py index 0827977..b1992ab 100644 --- a/cogs/miscellaneous/__init__.py +++ b/cogs/miscellaneous/__init__.py @@ -4,6 +4,7 @@ from discord.ext.commands import Context from .dontasktoask import dontasktoask_command from .rickroll import rr_command +from .depart import depart_command from .labubu import labubu_command from .tryitandsee import tryitandsee_command from .piracy import piracy_command @@ -23,7 +24,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, support", inline=False) + embed.add_field(name="Available", value="dontasktoask, rr, depart, labubu, tryitandsee, piracy, keanu, support", inline=False) await context.send(embed=embed) async def _invoke_hybrid(self, context: Context, name: str): @@ -51,6 +52,10 @@ class Miscellaneous(commands.GroupCog, name="misc"): async def miscellaneous_group_rr(self, context: Context): await self._invoke_hybrid(context, "rr") + @miscellaneous_group.command(name="depart") + async def miscellaneous_group_depart(self, context: Context): + await self._invoke_hybrid(context, "depart") + @miscellaneous_group.command(name="labubu") async def miscellaneous_group_labubu(self, context: Context): await self._invoke_hybrid(context, "labubu") @@ -87,6 +92,14 @@ class Miscellaneous(commands.GroupCog, name="misc"): async def rr(self, context): return await rr_command()(self, context) + @commands.check(_require_group_prefix) + @commands.hybrid_command( + name="depart", + description="Show the departure meme" + ) + async def depart(self, context): + return await depart_command()(self, context) + @commands.check(_require_group_prefix) @commands.hybrid_command( name="labubu", @@ -133,6 +146,7 @@ async def setup(bot) -> None: bot.logger.info("Loaded extension 'miscellaneous.dontasktoask'") bot.logger.info("Loaded extension 'miscellaneous.rr'") + bot.logger.info("Loaded extension 'miscellaneous.depart'") bot.logger.info("Loaded extension 'miscellaneous.labubu'") bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'") bot.logger.info("Loaded extension 'miscellaneous.piracy'") diff --git a/cogs/miscellaneous/depart.py b/cogs/miscellaneous/depart.py new file mode 100644 index 0000000..105669a --- /dev/null +++ b/cogs/miscellaneous/depart.py @@ -0,0 +1,29 @@ +import discord +from discord.ext import commands +from discord.ext.commands import Context + + +def depart_command(): + @commands.hybrid_command( + name="depart", + description="Show the departure meme", + ) + async def depart(self, context): + gif_url = "https://yes.nighty.works/raw/Mp6YGV.gif" + + embed = discord.Embed( + color=0x7289DA, + ) + embed.set_author(name="Depart", icon_url="https://yes.nighty.works/raw/YxMC0r.png") + embed.set_image(url=gif_url) + + 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 depart