feat(silly): new commad & botinfo now does discord-py version

This commit is contained in:
neoarz
2025-10-17 00:15:06 -04:00
parent 7955035b3b
commit 61848f6bc8
4 changed files with 58 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
## Commands
![Total Commands](https://img.shields.io/badge/Total%20Commands-66-5865F2)
![Total Commands](https://img.shields.io/badge/Total%20Commands-67-5865F2)
| Command group | Subcommands |
| ------------ | --- |
@@ -30,7 +30,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`, `depart`, `docs` `sigma`, `duck` |
| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask`, `support`, `depart`, `docs` `sigma`, `duck`, `silly` |
| utilities | `translate`, `codepreview`, `dictionary` |
| media | `download`, `mcquote`, `img2gif`, `tweety`, `tts` |

View File

@@ -99,6 +99,7 @@ class BotInfo(commands.Cog, name="botinfo"):
"**New to Syntrel?** Run `/help` to get started and explore all available commands!\n\n"
f"**Owner:** [neoarz](https://discordapp.com/users/1015372540937502851)\n"
f"**Python Version:** {platform.python_version()}\n"
f"**Discord.py Version:** {discord.__version__}\n"
f"**Prefix:** / (Slash Commands) or {self.bot.bot_prefix} for normal commands"
)
@@ -132,6 +133,7 @@ class BotInfo(commands.Cog, name="botinfo"):
"**New to Syntrel?** Run `/help` to get started and explore all available commands!\n\n"
f"**Owner:** [neoarz](https://discordapp.com/users/1015372540937502851)\n"
f"**Python Version:** {platform.python_version()}\n"
f"**Discord.py Version:** {discord.__version__}\n"
f"**Prefix:** / (Slash Commands) or {self.bot.bot_prefix} for normal commands"
)

View File

@@ -14,6 +14,7 @@ from .keanu import keanu_command
from .support import support_command
from .docs import docs_command
from .sigma import sigma_command
from .silly import silly_command
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@@ -31,7 +32,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, depart, labubu, duck, tryitandsee, piracy, keanu, support, docs", inline=False)
embed.add_field(name="Available", value="dontasktoask, rr, depart, labubu, duck, tryitandsee, piracy, keanu, support, docs, sigma, silly", inline=False)
await context.send(embed=embed)
async def _invoke_hybrid(self, context: Context, name: str):
@@ -95,6 +96,10 @@ class Miscellaneous(commands.GroupCog, name="misc"):
async def miscellaneous_group_sigma(self, context: Context):
await self._invoke_hybrid(context, "sigma")
@miscellaneous_group.command(name="silly")
async def miscellaneous_group_silly(self, context: Context, message_type: str = "regular"):
await self._invoke_hybrid(context, "silly", message_type=message_type)
@commands.check(_require_group_prefix)
@commands.hybrid_command(
name="dontasktoask",
@@ -183,6 +188,21 @@ class Miscellaneous(commands.GroupCog, name="misc"):
async def sigma(self, context):
return await sigma_command()(self, context)
@commands.check(_require_group_prefix)
@commands.hybrid_command(
name="silly",
description="Sends a silly message :3"
)
@app_commands.describe(
message_type="Type of message to send (regular or animated)"
)
@app_commands.choices(message_type=[
app_commands.Choice(name="Regular", value="regular"),
app_commands.Choice(name="Animated", value="animated")
])
async def silly(self, context, message_type: str = "regular"):
return await silly_command()(self, context, message_type=message_type)
async def setup(bot) -> None:
cog = Miscellaneous(bot)
await bot.add_cog(cog)
@@ -198,3 +218,4 @@ async def setup(bot) -> None:
bot.logger.info("Loaded extension 'miscellaneous.support'")
bot.logger.info("Loaded extension 'miscellaneous.docs'")
bot.logger.info("Loaded extension 'miscellaneous.sigma'")
bot.logger.info("Loaded extension 'miscellaneous.silly'")

View File

@@ -0,0 +1,32 @@
import discord
from discord.ext import commands
from discord.ext.commands import Context
def silly_command():
@commands.hybrid_command(
name="silly",
description="Sends a silly message :3",
)
async def silly(self, context, message_type: str = "regular"):
if message_type == "animated":
message = "https://yes.nighty.works/raw/LX4nqt.gif"
else:
message = ":3"
interaction = getattr(context, "interaction", None)
if interaction is not None:
await interaction.response.defer(ephemeral=True)
await context.channel.send(message)
try:
await interaction.delete_original_response()
except:
pass
else:
try:
await context.message.delete()
except:
pass
await context.channel.send(message)
return silly