diff --git a/README.md b/README.md index c80fa95..56eb147 100644 --- a/README.md +++ b/README.md @@ -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` | diff --git a/cogs/botinfo.py b/cogs/botinfo.py index 8777e51..d1d2e51 100644 --- a/cogs/botinfo.py +++ b/cogs/botinfo.py @@ -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" ) diff --git a/cogs/miscellaneous/__init__.py b/cogs/miscellaneous/__init__.py index 2e52f47..499c8b5 100644 --- a/cogs/miscellaneous/__init__.py +++ b/cogs/miscellaneous/__init__.py @@ -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'") diff --git a/cogs/miscellaneous/silly.py b/cogs/miscellaneous/silly.py new file mode 100644 index 0000000..eafd0ae --- /dev/null +++ b/cogs/miscellaneous/silly.py @@ -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 \ No newline at end of file