From db0368eb4d5e374563778bdc392d460498d9dd14 Mon Sep 17 00:00:00 2001 From: neoarz Date: Thu, 16 Oct 2025 01:02:56 -0400 Subject: [PATCH] feat(duck): new command & update todo --- README.md | 4 ++-- TODO.md | 8 ++++++++ cogs/miscellaneous/__init__.py | 16 ++++++++++++++- cogs/miscellaneous/duck.py | 36 ++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 cogs/miscellaneous/duck.py diff --git a/README.md b/README.md index 65efb64..c80fa95 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ ## Commands -![Total Commands](https://img.shields.io/badge/Total%20Commands-65-5865F2) +![Total Commands](https://img.shields.io/badge/Total%20Commands-66-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` | +| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask`, `support`, `depart`, `docs` `sigma`, `duck` | | utilities | `translate`, `codepreview`, `dictionary` | | media | `download`, `mcquote`, `img2gif`, `tweety`, `tts` | diff --git a/TODO.md b/TODO.md index 1786425..5df3b5b 100644 --- a/TODO.md +++ b/TODO.md @@ -49,6 +49,14 @@ - [ ] Add random picture command +- [ ] Add reminder command + +- [ ] Add converting file types + +- [ ] fix code preview command + +- [ ] Add moderation giverole command + - [ ] add ~~admin abuse~~ command (for games) - [x] add [tts](https://developer.puter.com/tutorials/free-unlimited-text-to-speech-api/) command diff --git a/cogs/miscellaneous/__init__.py b/cogs/miscellaneous/__init__.py index b3cecbd..2e52f47 100644 --- a/cogs/miscellaneous/__init__.py +++ b/cogs/miscellaneous/__init__.py @@ -7,6 +7,7 @@ from .dontasktoask import dontasktoask_command from .rickroll import rr_command from .depart import depart_command from .labubu import labubu_command +from .duck import duck_command from .tryitandsee import tryitandsee_command from .piracy import piracy_command from .keanu import keanu_command @@ -30,7 +31,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, tryitandsee, piracy, keanu, support, docs", inline=False) + embed.add_field(name="Available", value="dontasktoask, rr, depart, labubu, duck, tryitandsee, piracy, keanu, support, docs", inline=False) await context.send(embed=embed) async def _invoke_hybrid(self, context: Context, name: str): @@ -66,6 +67,10 @@ class Miscellaneous(commands.GroupCog, name="misc"): async def miscellaneous_group_labubu(self, context: Context): await self._invoke_hybrid(context, "labubu") + @miscellaneous_group.command(name="duck") + async def miscellaneous_group_duck(self, context: Context): + await self._invoke_hybrid(context, "duck") + @miscellaneous_group.command(name="tryitandsee") async def miscellaneous_group_tryitandsee(self, context: Context): await self._invoke_hybrid(context, "tryitandsee") @@ -122,6 +127,14 @@ class Miscellaneous(commands.GroupCog, name="misc"): async def labubu(self, context): return await labubu_command()(self, context) + @commands.check(_require_group_prefix) + @commands.hybrid_command( + name="duck", + description="Duck ASCII art" + ) + async def duck(self, context): + return await duck_command()(self, context) + @commands.check(_require_group_prefix) @commands.hybrid_command( name="tryitandsee", @@ -178,6 +191,7 @@ async def setup(bot) -> None: 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.duck'") bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'") bot.logger.info("Loaded extension 'miscellaneous.piracy'") bot.logger.info("Loaded extension 'miscellaneous.keanu'") diff --git a/cogs/miscellaneous/duck.py b/cogs/miscellaneous/duck.py new file mode 100644 index 0000000..5f9b429 --- /dev/null +++ b/cogs/miscellaneous/duck.py @@ -0,0 +1,36 @@ +import discord +from discord.ext import commands +from discord.ext.commands import Context + + +def duck_command(): + @commands.hybrid_command( + name="duck", + description="Duck ASCII art", + ) + async def duck(self, context): + duck_art = """ +⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ +⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⣉⡥⠶⢶⣿⣿⣿⣿⣷⣆⠉⠛⠿⣿⣿⣿⣿⣿⣿⣿ +⣿⣿⣿⣿⣿⣿⣿⡿⢡⡞⠁⠀⠀⠤⠈⠿⠿⠿⠿⣿⠀⢻⣦⡈⠻⣿⣿⣿⣿⣿ +⣿⣿⣿⣿⣿⣿⣿⡇⠘⡁⠀⢀⣀⣀⣀⣈⣁⣐⡒⠢⢤⡈⠛⢿⡄⠻⣿⣿⣿⣿ +⣿⣿⣿⣿⣿⣿⣿⡇⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣶⣄⠉⠐⠄⡈⢀⣿⣿⣿⣿ +⣿⣿⣿⣿⣿⣿⣿⠇⢠⣿⣿⣿⣿⡿⢿⣿⣿⣿⠁⢈⣿⡄⠀⢀⣀⠸⣿⣿⣿⣿ +⣿⣿⣿⣿⡿⠟⣡⣶⣶⣬⣭⣥⣴⠀⣾⣿⣿⣿⣶⣾⣿⣧⠀⣼⣿⣷⣌⡻⢿⣿ +⣿⣿⠟⣋⣴⣾⣿⣿⣿⣿⣿⣿⣿⡇⢿⣿⣿⣿⣿⣿⣿⡿⢸⣿⣿⣿⣿⣷⠄⢻ +⡏⠰⢾⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢂⣭⣿⣿⣿⣿⣿⠇⠘⠛⠛⢉⣉⣠⣴⣾ +⣿⣷⣦⣬⣍⣉⣉⣛⣛⣉⠉⣤⣶⣾⣿⣿⣿⣿⣿⣿⡿⢰⣿⣿⣿⣿⣿⣿⣿⣿ +⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡘⣿⣿⣿⣿⣿⣿⣿⣿⡇⣼⣿⣿⣿⣿⣿⣿⣿⣿ +⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⢸⣿⣿⣿⣿⣿⣿⣿⠁⣿⣿⣿⣿⣿⣿⣿⣿⣿ +""" + + if getattr(context, "interaction", None): + inter = context.interaction + if not inter.response.is_done(): + await inter.response.send_message(f"```ansi\n{duck_art}\n```", ephemeral=False) + else: + await inter.followup.send(f"```ansi\n{duck_art}\n```", ephemeral=True) + else: + await context.send(f"```ansi\n{duck_art}\n```") + + return duck