feat(support): new support command

This commit is contained in:
neoarz
2025-09-29 22:11:14 -04:00
parent 6ad1e296f1
commit c0afe06e4d
3 changed files with 42 additions and 2 deletions

View File

@@ -26,7 +26,7 @@
| moderation | `kick`, `ban`, `nick`, `purge`, `hackban`, `warnings`, `archive` | | moderation | `kick`, `ban`, `nick`, `purge`, `hackban`, `warnings`, `archive` |
| sidestore | `sidestore`, `refresh`, `code`, `crash`, `pairing`, `server`, `half`, `sparse`, `afc`, `udid` | | sidestore | `sidestore`, `refresh`, `code`, `crash`, `pairing`, `server`, `half`, `sparse`, `afc`, `udid` |
| idevice | `idevice`, `noapps`, `errorcode`, `developermode`, `mountddi` | | idevice | `idevice`, `noapps`, `errorcode`, `developermode`, `mountddi` |
| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask` | | miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask`, `support`|
| utilities | `translate` | | utilities | `translate` |
## Download ## Download

View File

@@ -8,6 +8,7 @@ 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
from .keanu import keanu_command from .keanu import keanu_command
from .support import support_command
class Miscellaneous(commands.GroupCog, name="misc"): class Miscellaneous(commands.GroupCog, name="misc"):
def __init__(self, bot) -> None: def __init__(self, bot) -> None:
@@ -22,7 +23,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", inline=False) embed.add_field(name="Available", value="dontasktoask, rr, 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):
@@ -66,6 +67,10 @@ class Miscellaneous(commands.GroupCog, name="misc"):
async def miscellaneous_group_keanu(self, context: Context): async def miscellaneous_group_keanu(self, context: Context):
await self._invoke_hybrid(context, "keanu") 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.check(_require_group_prefix)
@commands.hybrid_command( @commands.hybrid_command(
name="dontasktoask", name="dontasktoask",
@@ -114,6 +119,14 @@ class Miscellaneous(commands.GroupCog, name="misc"):
async def keanu(self, context): async def keanu(self, context):
return await keanu_command()(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: async def setup(bot) -> None:
cog = Miscellaneous(bot) cog = Miscellaneous(bot)
await bot.add_cog(cog) 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.tryitandsee'")
bot.logger.info("Loaded extension 'miscellaneous.piracy'") bot.logger.info("Loaded extension 'miscellaneous.piracy'")
bot.logger.info("Loaded extension 'miscellaneous.keanu'") bot.logger.info("Loaded extension 'miscellaneous.keanu'")
bot.logger.info("Loaded extension 'miscellaneous.support'")

View File

@@ -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