mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 11:40:12 +01:00
feat(dontasktoask): new command
This commit is contained in:
@@ -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` |
|
| miscellaneous | `keanu`, `labubu`, `piracy`, `tryitandsee`, `rickroll`, `dontasktoask` |
|
||||||
| utilities | `translate` |
|
| utilities | `translate` |
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|||||||
@@ -40,9 +40,11 @@ class Help(commands.Cog, name="help"):
|
|||||||
"general": "general",
|
"general": "general",
|
||||||
"fun": "fun",
|
"fun": "fun",
|
||||||
"idevice": "idevice",
|
"idevice": "idevice",
|
||||||
|
"misc": "miscellaneous",
|
||||||
"miscellaneous": "miscellaneous",
|
"miscellaneous": "miscellaneous",
|
||||||
"moderation": "moderation",
|
"moderation": "moderation",
|
||||||
"sidestore": "sidestore",
|
"sidestore": "sidestore",
|
||||||
|
"utils": "utilities",
|
||||||
"utilities": "utilities",
|
"utilities": "utilities",
|
||||||
|
|
||||||
"sync": "owner",
|
"sync": "owner",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import discord
|
|||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from discord.ext.commands import Context
|
from discord.ext.commands import Context
|
||||||
|
|
||||||
|
from .dontasktoask import dontasktoask_command
|
||||||
from .rickroll import rr_command
|
from .rickroll import rr_command
|
||||||
from .labubu import labubu_command
|
from .labubu import labubu_command
|
||||||
from .tryitandsee import tryitandsee_command
|
from .tryitandsee import tryitandsee_command
|
||||||
@@ -21,7 +22,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="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)
|
await context.send(embed=embed)
|
||||||
|
|
||||||
async def _invoke_hybrid(self, context: Context, name: str):
|
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()
|
content = context.message.content.strip().lower()
|
||||||
return content.startswith(f"{prefix}{group} ")
|
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")
|
@miscellaneous_group.command(name="rr")
|
||||||
async def miscellaneous_group_rr(self, context: Context):
|
async def miscellaneous_group_rr(self, context: Context):
|
||||||
await self._invoke_hybrid(context, "rr")
|
await self._invoke_hybrid(context, "rr")
|
||||||
@@ -61,6 +66,14 @@ 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")
|
||||||
|
|
||||||
|
@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.check(_require_group_prefix)
|
||||||
@commands.hybrid_command(
|
@commands.hybrid_command(
|
||||||
name="rr",
|
name="rr",
|
||||||
@@ -105,6 +118,7 @@ async def setup(bot) -> None:
|
|||||||
cog = Miscellaneous(bot)
|
cog = Miscellaneous(bot)
|
||||||
await bot.add_cog(cog)
|
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.rr'")
|
||||||
bot.logger.info("Loaded extension 'miscellaneous.labubu'")
|
bot.logger.info("Loaded extension 'miscellaneous.labubu'")
|
||||||
bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'")
|
bot.logger.info("Loaded extension 'miscellaneous.tryitandsee'")
|
||||||
|
|||||||
26
cogs/miscellaneous/dontasktoask.py
Normal file
26
cogs/miscellaneous/dontasktoask.py
Normal 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
|
||||||
Reference in New Issue
Block a user