mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 11:40:12 +01:00
feat(depart): new command :) (requested by jackson)
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
| sidestore | `help`, `refresh`, `code`, `crash`, `pairing`, `server`, `half`, `sparse`, `afc`, `udid` |
|
| sidestore | `help`, `refresh`, `code`, `crash`, `pairing`, `server`, `half`, `sparse`, `afc`, `udid` |
|
||||||
| idevice | `help`, `noapps`, `errorcode`, `developermode`, `mountddi` |
|
| idevice | `help`, `noapps`, `errorcode`, `developermode`, `mountddi` |
|
||||||
| melonx | `help`, `transfer`, `mods`, `gamecrash`, `requirements`, `error`, `26` |
|
| 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` |
|
| utilities | `translate`, `codepreview`, `dictionary` |
|
||||||
| media | `download`, `mcquote`, `img2gif` |
|
| media | `download`, `mcquote`, `img2gif` |
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from discord.ext.commands import Context
|
|||||||
|
|
||||||
from .dontasktoask import dontasktoask_command
|
from .dontasktoask import dontasktoask_command
|
||||||
from .rickroll import rr_command
|
from .rickroll import rr_command
|
||||||
|
from .depart import depart_command
|
||||||
from .labubu import labubu_command
|
from .labubu import labubu_command
|
||||||
from .tryitandsee import tryitandsee_command
|
from .tryitandsee import tryitandsee_command
|
||||||
from .piracy import piracy_command
|
from .piracy import piracy_command
|
||||||
@@ -23,7 +24,7 @@ class Miscellaneous(commands.GroupCog, name="misc"):
|
|||||||
color=0x7289DA
|
color=0x7289DA
|
||||||
)
|
)
|
||||||
embed.set_author(name="Miscellaneous", icon_url="https://yes.nighty.works/raw/YxMC0r.png")
|
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)
|
await context.send(embed=embed)
|
||||||
|
|
||||||
async def _invoke_hybrid(self, context: Context, name: str):
|
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):
|
async def miscellaneous_group_rr(self, context: Context):
|
||||||
await self._invoke_hybrid(context, "rr")
|
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")
|
@miscellaneous_group.command(name="labubu")
|
||||||
async def miscellaneous_group_labubu(self, context: Context):
|
async def miscellaneous_group_labubu(self, context: Context):
|
||||||
await self._invoke_hybrid(context, "labubu")
|
await self._invoke_hybrid(context, "labubu")
|
||||||
@@ -87,6 +92,14 @@ class Miscellaneous(commands.GroupCog, name="misc"):
|
|||||||
async def rr(self, context):
|
async def rr(self, context):
|
||||||
return await rr_command()(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.check(_require_group_prefix)
|
||||||
@commands.hybrid_command(
|
@commands.hybrid_command(
|
||||||
name="labubu",
|
name="labubu",
|
||||||
@@ -133,6 +146,7 @@ async def setup(bot) -> None:
|
|||||||
|
|
||||||
bot.logger.info("Loaded extension 'miscellaneous.dontasktoask'")
|
bot.logger.info("Loaded extension 'miscellaneous.dontasktoask'")
|
||||||
bot.logger.info("Loaded extension 'miscellaneous.rr'")
|
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.labubu'")
|
||||||
bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'")
|
bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'")
|
||||||
bot.logger.info("Loaded extension 'miscellaneous.piracy'")
|
bot.logger.info("Loaded extension 'miscellaneous.piracy'")
|
||||||
|
|||||||
29
cogs/miscellaneous/depart.py
Normal file
29
cogs/miscellaneous/depart.py
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user