feat(dontasktoask): new command

This commit is contained in:
neoarz
2025-09-29 21:17:04 -04:00
parent e92b768294
commit 6ad1e296f1
4 changed files with 45 additions and 3 deletions

View File

@@ -40,9 +40,11 @@ class Help(commands.Cog, name="help"):
"general": "general",
"fun": "fun",
"idevice": "idevice",
"misc": "miscellaneous",
"miscellaneous": "miscellaneous",
"moderation": "moderation",
"sidestore": "sidestore",
"utils": "utilities",
"utilities": "utilities",
"sync": "owner",
@@ -180,4 +182,4 @@ class Help(commands.Cog, name="help"):
async def setup(bot) -> None:
await bot.add_cog(Help(bot))
await bot.add_cog(Help(bot))

View File

@@ -2,6 +2,7 @@ import discord
from discord.ext import commands
from discord.ext.commands import Context
from .dontasktoask import dontasktoask_command
from .rickroll import rr_command
from .labubu import labubu_command
from .tryitandsee import tryitandsee_command
@@ -21,7 +22,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="rr, labubu, tryitandsee, piracy, keanu", inline=False)
embed.add_field(name="Available", value="dontasktoask, rr, labubu, tryitandsee, piracy, keanu", inline=False)
await context.send(embed=embed)
async def _invoke_hybrid(self, context: Context, name: str):
@@ -41,6 +42,10 @@ class Miscellaneous(commands.GroupCog, name="misc"):
content = context.message.content.strip().lower()
return content.startswith(f"{prefix}{group} ")
@miscellaneous_group.command(name="dontasktoask")
async def miscellaneous_group_dontasktoask(self, context: Context):
await self._invoke_hybrid(context, "dontasktoask")
@miscellaneous_group.command(name="rr")
async def miscellaneous_group_rr(self, context: Context):
await self._invoke_hybrid(context, "rr")
@@ -61,6 +66,14 @@ class Miscellaneous(commands.GroupCog, name="misc"):
async def miscellaneous_group_keanu(self, context: Context):
await self._invoke_hybrid(context, "keanu")
@commands.check(_require_group_prefix)
@commands.hybrid_command(
name="dontasktoask",
description="Shows the 'Don't Ask to Ask' image."
)
async def dontasktoask(self, context):
return await dontasktoask_command()(self, context)
@commands.check(_require_group_prefix)
@commands.hybrid_command(
name="rr",
@@ -105,6 +118,7 @@ async def setup(bot) -> None:
cog = Miscellaneous(bot)
await bot.add_cog(cog)
bot.logger.info("Loaded extension 'miscellaneous.dontasktoask'")
bot.logger.info("Loaded extension 'miscellaneous.rr'")
bot.logger.info("Loaded extension 'miscellaneous.labubu'")
bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'")

View File

@@ -0,0 +1,26 @@
import discord
from discord.ext import commands
from discord.ext.commands import Context
def dontasktoask_command():
@commands.hybrid_command(
name="dontasktoask",
description="Shows the 'Don't Ask to Ask' image."
)
async def dontasktoask(self, context):
embed = discord.Embed(
color=0x7289DA
)
embed.set_author(name="Don't Ask to Ask", icon_url="https://yes.nighty.works/raw/YxMC0r.png")
embed.set_image(url="https://yes.nighty.works/raw/KecbCr.jpg")
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 dontasktoask