Refactor command definitions across various cogs to replace hybrid commands with regular commands for improved consistency and clarity. Update command structures in moderation, music, and other cogs to enhance user experience and streamline command handling.
This commit is contained in:
@@ -30,10 +30,25 @@ class Games(Cog):
|
||||
def __init__(self, client: Axiom):
|
||||
self.client = client
|
||||
|
||||
@commands.hybrid_group(
|
||||
name="game",
|
||||
description="Play mini-games with friends or the bot.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@commands.guild_only()
|
||||
async def game(self, ctx: Context):
|
||||
"""Games root — use `/game <subcommand>` or `>game <subcommand>`."""
|
||||
if ctx.subcommand_passed is None:
|
||||
await ctx.send_help(ctx.command)
|
||||
ctx.command.reset_cooldown(ctx)
|
||||
|
||||
@commands.hybrid_command(name="chess",
|
||||
@game.command(name="chess",
|
||||
help="Play Chess with a user.",
|
||||
usage="Chess <user>")
|
||||
usage="game chess <user>")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -49,10 +64,10 @@ class Games(Cog):
|
||||
await game.start(ctx)
|
||||
|
||||
|
||||
@commands.hybrid_command(name="rps",
|
||||
@game.command(name="rps",
|
||||
help="Play Rock Paper Scissor with bot/user.",
|
||||
aliases=["rockpaperscissors"],
|
||||
usage="Rockpaperscissors")
|
||||
usage="game rps [user]")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -62,10 +77,10 @@ class Games(Cog):
|
||||
game = btn.BetaRockPaperScissors(player)
|
||||
await game.start(ctx, timeout=120)
|
||||
|
||||
@commands.hybrid_command(name="tic-tac-toe",
|
||||
@game.command(name="tictactoe",
|
||||
help="play tic-tac-toe game with a user.",
|
||||
aliases=["ttt", "tictactoe"],
|
||||
usage="Ticktactoe <member>")
|
||||
aliases=["ttt", "tic-tac-toe"],
|
||||
usage="game tictactoe <member>")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -80,9 +95,9 @@ class Games(Cog):
|
||||
game = btn.BetaTictactoe(cross=ctx.author, circle=player)
|
||||
await game.start(ctx, timeout=30)
|
||||
|
||||
@commands.hybrid_command(name="wordle",
|
||||
@game.command(name="wordle",
|
||||
help="Wordle Game | Play with bot.",
|
||||
usage="Wordle")
|
||||
usage="game wordle")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -92,10 +107,10 @@ class Games(Cog):
|
||||
game = games.Wordle()
|
||||
await game.start(ctx, timeout=120)
|
||||
|
||||
@commands.hybrid_command(name="2048",
|
||||
@game.command(name="2048",
|
||||
help="Play 2048 game with bot.",
|
||||
aliases=["twenty48"],
|
||||
usage="2048")
|
||||
usage="game 2048")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -105,10 +120,10 @@ class Games(Cog):
|
||||
game = btn.BetaTwenty48()
|
||||
await game.start(ctx, win_at=2048)
|
||||
|
||||
@commands.hybrid_command(name="memory-game",
|
||||
@game.command(name="memory",
|
||||
help="How strong is your memory?",
|
||||
aliases=["memory"],
|
||||
usage="memory-game")
|
||||
aliases=["memory-game"],
|
||||
usage="game memory")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -118,10 +133,10 @@ class Games(Cog):
|
||||
game = btn.MemoryGame()
|
||||
await game.start(ctx)
|
||||
|
||||
@commands.hybrid_command(name="number-slider",
|
||||
@game.command(name="slider",
|
||||
help="slide numbers with bot",
|
||||
aliases=["slider"],
|
||||
usage="slider")
|
||||
aliases=["number-slider"],
|
||||
usage="game slider")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -131,10 +146,10 @@ class Games(Cog):
|
||||
game = btn.NumberSlider()
|
||||
await game.start(ctx)
|
||||
|
||||
@commands.hybrid_command(name="battleship",
|
||||
@game.command(name="battleship",
|
||||
help="Play battleship game with your friend.",
|
||||
aliases=["battle-ship"],
|
||||
usage="battleship <user>")
|
||||
usage="game battleship <user>")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -164,10 +179,10 @@ class Games(Cog):
|
||||
async def _end_country_guesser(self, ctx: Context):
|
||||
await self.country_guesser_game.end_game_manually(ctx)"""
|
||||
|
||||
@commands.hybrid_command(name="connectfour",
|
||||
@game.command(name="connectfour",
|
||||
help="Play Connect Four game with user.",
|
||||
aliases=["c4", "connect-four", "connect4"],
|
||||
usage="connectfour <user>")
|
||||
usage="game connectfour <user>")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -184,10 +199,10 @@ class Games(Cog):
|
||||
|
||||
|
||||
|
||||
@commands.hybrid_command(name="lights-out",
|
||||
@game.command(name="lightsout",
|
||||
help="Play Lights Show game with bot.",
|
||||
aliases=["lightsout"],
|
||||
usage="Lights-out")
|
||||
aliases=["lights-out"],
|
||||
usage="game lightsout")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
|
||||
@@ -47,7 +47,13 @@ class Media(commands.Cog):
|
||||
async def on_ready(self):
|
||||
await self.set_db()
|
||||
|
||||
@commands.hybrid_group(name="media", help="Setup Media channel, Media channel will not allow users to send messages other than media files.", invoke_without_command=True)
|
||||
@commands.hybrid_group(
|
||||
name="media",
|
||||
description="Setup Media channel; only media files are allowed.",
|
||||
help="Setup Media channel, Media channel will not allow users to send messages other than media files.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
|
||||
@@ -57,16 +57,34 @@ class Whitelist(commands.Cog):
|
||||
''')
|
||||
await self.db.commit()
|
||||
|
||||
@commands.hybrid_command(name='whitelist', aliases=['wl'], help="Whitelists a user from antinuke for a specific action.")
|
||||
|
||||
@commands.hybrid_group(
|
||||
name="whitelist",
|
||||
aliases=["wl"],
|
||||
description="Manage antinuke whitelist.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
help="Whitelists a user from antinuke for a specific action.",
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
|
||||
@commands.guild_only()
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def whitelist(self, ctx):
|
||||
"""Whitelist root — use `/whitelist <subcommand>` or `>whitelist <subcommand>`."""
|
||||
if ctx.subcommand_passed is None:
|
||||
await ctx.send_help(ctx.command)
|
||||
ctx.command.reset_cooldown(ctx)
|
||||
|
||||
async def whitelist(self, ctx, member: discord.Member = None):
|
||||
@whitelist.command(name="add", help="Whitelists a user from antinuke for a specific action.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
|
||||
@commands.guild_only()
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def whitelist_add(self, ctx, member: discord.Member = None):
|
||||
if ctx.guild.member_count < 2:
|
||||
view = CV2(f"{CROSS} Error", "Your Server Doesn't Meet My 30 Member Criteria")
|
||||
return await ctx.send(view=view)
|
||||
@@ -101,7 +119,7 @@ class Whitelist(commands.Cog):
|
||||
view = CV2(
|
||||
"__Whitelist Commands__",
|
||||
"**Adding a user to the whitelist means that no actions will be taken against them if they trigger the Anti-Nuke Module.**",
|
||||
f"**Usage**\n{ARROWRED} `{prefix}whitelist @user/id`\n{ARROWRED} `{prefix}wl @user`"
|
||||
f"**Usage**\n{ARROWRED} `{prefix}whitelist add @user/id`\n{ARROWRED} `{prefix}wl add @user`"
|
||||
)
|
||||
return await ctx.send(view=view)
|
||||
|
||||
@@ -252,7 +270,7 @@ class Whitelist(commands.Cog):
|
||||
await msg.edit(view=None)
|
||||
|
||||
|
||||
@commands.hybrid_command(name='whitelisted', aliases=['wlist'], help="Shows the list of whitelisted users.")
|
||||
@whitelist.command(name="list", aliases=["whitelisted", "wlist"], help="Shows the list of whitelisted users.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@@ -308,7 +326,7 @@ class Whitelist(commands.Cog):
|
||||
await ctx.send(view=view)
|
||||
|
||||
|
||||
@commands.hybrid_command(name="whitelistreset", aliases=['wlreset'], help="Resets the whitelisted users.")
|
||||
@whitelist.command(name="reset", aliases=["whitelistreset", "wlreset"], help="Resets the whitelisted users.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 10, commands.BucketType.user)
|
||||
|
||||
@@ -183,11 +183,19 @@ class Automod(commands.Cog):
|
||||
""")
|
||||
await db.commit()
|
||||
|
||||
@commands.hybrid_group(invoke_without_command=True)
|
||||
@commands.hybrid_group(
|
||||
name="automod",
|
||||
aliases=["am"],
|
||||
invoke_without_command=True,
|
||||
with_app_command=True,
|
||||
description="Configure server Automod (enable, disable, punishments, ignores).",
|
||||
fallback="help",
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 4, commands.BucketType.user)
|
||||
async def automod(self, ctx):
|
||||
"""Automod root — use `/automod <subcommand>` or `>automod <subcommand>`."""
|
||||
if ctx.subcommand_passed is None:
|
||||
await ctx.send_help(ctx.command)
|
||||
ctx.command.reset_cooldown(ctx)
|
||||
|
||||
@@ -500,7 +500,23 @@ class Customrole(commands.Cog):
|
||||
|
||||
|
||||
|
||||
@commands.hybrid_command(name="staff",
|
||||
@commands.hybrid_group(
|
||||
name="customrole",
|
||||
aliases=["cr"],
|
||||
description="Assign or remove custom roles for members.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
async def customrole(self, context: Context):
|
||||
"""Customrole root — use `/customrole <subcommand>` or `>customrole <subcommand>`."""
|
||||
if context.subcommand_passed is None:
|
||||
await context.send_help(context.command)
|
||||
context.command.reset_cooldown(context)
|
||||
|
||||
@customrole.command(name="staff",
|
||||
description="Gives the staff role to the user.",
|
||||
aliases=['official'],
|
||||
help="Gives the staff role to the user.")
|
||||
@@ -511,7 +527,7 @@ class Customrole(commands.Cog):
|
||||
async def _staff(self, context: Context, member: discord.Member) -> None:
|
||||
await self.handle_role_command(context, member, 'staff')
|
||||
|
||||
@commands.hybrid_command(name="girl",
|
||||
@customrole.command(name="girl",
|
||||
description="Gives the girl role to the user.",
|
||||
aliases=['qt'],
|
||||
help="Gives the girl role to the user.")
|
||||
@@ -522,7 +538,7 @@ class Customrole(commands.Cog):
|
||||
async def _girl(self, context: Context, member: discord.Member) -> None:
|
||||
await self.handle_role_command(context, member, 'girl')
|
||||
|
||||
@commands.hybrid_command(name="vip",
|
||||
@customrole.command(name="vip",
|
||||
description="Gives the VIP role to the user.",
|
||||
help="Gives the VIP role to the user.")
|
||||
@blacklist_check()
|
||||
@@ -532,7 +548,7 @@ class Customrole(commands.Cog):
|
||||
async def _vip(self, context: Context, member: discord.Member) -> None:
|
||||
await self.handle_role_command(context, member, 'vip')
|
||||
|
||||
@commands.hybrid_command(name="guest",
|
||||
@customrole.command(name="guest",
|
||||
description="Gives the guest role to the user.",
|
||||
help="Gives the guest role to the user.")
|
||||
@blacklist_check()
|
||||
@@ -542,7 +558,7 @@ class Customrole(commands.Cog):
|
||||
async def _guest(self, context: Context, member: discord.Member) -> None:
|
||||
await self.handle_role_command(context, member, 'guest')
|
||||
|
||||
@commands.hybrid_command(name="friend",
|
||||
@customrole.command(name="friend",
|
||||
description="Gives the friend role to the user.",
|
||||
aliases=['frnd'],
|
||||
help="Gives the friend role to the user.")
|
||||
|
||||
@@ -125,7 +125,12 @@ class Extra(commands.Cog):
|
||||
self.color = 0xFF0000
|
||||
self.start_time = datetime.datetime.now()
|
||||
|
||||
@commands.hybrid_group(name="banner")
|
||||
@commands.hybrid_group(
|
||||
name="banner",
|
||||
description="Show user or server banners.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
|
||||
@@ -66,7 +66,12 @@ class FilterCog(commands.Cog):
|
||||
self.active_filters[ctx.guild.id] = filter_name
|
||||
await ctx.send(embed=discord.Embed(description=f"Filter set to **{filter_name}**.", color=discord.Color.green()))
|
||||
|
||||
@commands.hybrid_group(invoke_without_command=True)
|
||||
@commands.hybrid_group(
|
||||
name="filter",
|
||||
description="Enable or disable audio filters for music.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
|
||||
@@ -159,7 +159,24 @@ class Giveaway(commands.Cog):
|
||||
|
||||
|
||||
|
||||
@commands.hybrid_command(description="Starts a new giveaway.")
|
||||
@commands.hybrid_group(
|
||||
name="giveaway",
|
||||
aliases=["g"],
|
||||
description="Manage server giveaways.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@commands.has_guild_permissions(manage_guild=True)
|
||||
async def giveaway(self, ctx):
|
||||
"""Giveaway root — use `/giveaway <subcommand>` or `>giveaway <subcommand>`."""
|
||||
if ctx.subcommand_passed is None:
|
||||
await ctx.send_help(ctx.command)
|
||||
ctx.command.reset_cooldown(ctx)
|
||||
|
||||
@giveaway.command(name="start", aliases=["gstart"], description="Starts a new giveaway.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@@ -244,7 +261,7 @@ class Giveaway(commands.Cog):
|
||||
print(f"Giveaway message deleted in {message.guild.name} - {message.guild.id}")
|
||||
await self.connection.commit()
|
||||
|
||||
@commands.hybrid_command(name="gend", description="Ends a giveaway before its ending time.", help="Ends a giveaway before its ending time.")
|
||||
@giveaway.command(name="end", aliases=["gend"], description="Ends a giveaway before its ending time.", help="Ends a giveaway before its ending time.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@@ -329,7 +346,7 @@ class Giveaway(commands.Cog):
|
||||
await ctx.send("Please reply to the giveaway message or provide the giveaway ID.")
|
||||
await self.connection.commit()
|
||||
|
||||
@commands.hybrid_command(description="Rerolls a giveaway on replying the giveaway message.", help="Rerolls a giveaway on replying the giveaway message.")
|
||||
@giveaway.command(name="reroll", aliases=["greroll"], description="Rerolls a giveaway on replying the giveaway message.", help="Rerolls a giveaway on replying the giveaway message.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@@ -389,7 +406,7 @@ class Giveaway(commands.Cog):
|
||||
return val * time_dict[unit]
|
||||
|
||||
|
||||
@commands.hybrid_command(name="glist", description="Lists all ongoing giveaways.")
|
||||
@giveaway.command(name="list", aliases=["glist"], description="Lists all ongoing giveaways.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
|
||||
@@ -1598,7 +1598,12 @@ class Logging(commands.Cog):
|
||||
embeds.append(config_embed)
|
||||
return embeds
|
||||
|
||||
@commands.hybrid_group(invoke_without_command=True, name="log")
|
||||
@commands.hybrid_group(
|
||||
invoke_without_command=True,
|
||||
name="log",
|
||||
description="Configure server logging channels and events.",
|
||||
fallback="help",
|
||||
)
|
||||
async def log(self, ctx: commands.Context):
|
||||
"""Main logging command group. Works with both slash (/) and prefix (!) commands."""
|
||||
|
||||
|
||||
@@ -585,7 +585,23 @@ class Music(commands.Cog):
|
||||
bar = '█' * filled_length + '░' * (length - filled_length)
|
||||
return bar
|
||||
|
||||
@commands.command(name="play", aliases=['p'], usage="play <query>", help="Plays a song or playlist.")
|
||||
@commands.hybrid_group(
|
||||
name="music",
|
||||
aliases=["m"],
|
||||
description="Music player commands.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
async def music(self, ctx: commands.Context):
|
||||
"""Music root — use `/music <subcommand>` or `>music <subcommand>`."""
|
||||
if ctx.subcommand_passed is None:
|
||||
await ctx.send_help(ctx.command)
|
||||
ctx.command.reset_cooldown(ctx)
|
||||
|
||||
@music.command(name="play", aliases=['p'], usage="music play <query>", help="Plays a song or playlist.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -594,7 +610,7 @@ class Music(commands.Cog):
|
||||
await self.play_source(ctx, query)
|
||||
|
||||
|
||||
@commands.command(name="search", usage="search <query>", help="Searches music from multiple platforms.")
|
||||
@music.command(name="search", usage="music search <query>", help="Searches music from multiple platforms.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -606,7 +622,7 @@ class Music(commands.Cog):
|
||||
await ctx.send(view=PlatformSelectView(ctx, query))
|
||||
|
||||
|
||||
@commands.command(name="nowplaying", aliases=["nop"], usage="nowplaying", help="Shows the info about current playing song.")
|
||||
@music.command(name="nowplaying", aliases=["nop"], usage="music nowplaying", help="Shows the info about current playing song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -659,7 +675,7 @@ class Music(commands.Cog):
|
||||
|
||||
await ctx.send(view=view)
|
||||
|
||||
@commands.command(name="autoplay", usage="autoplay", help="Toggles autoplay mode.")
|
||||
@music.command(name="autoplay", usage="music autoplay", help="Toggles autoplay mode.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -679,7 +695,7 @@ class Music(commands.Cog):
|
||||
)
|
||||
await ctx.send(view=CV2(f"{TICK} Autoplay {'enabled' if vc.autoplay == wavelink.AutoPlayMode.enabled else 'disabled'} by {ctx.author.mention}."))
|
||||
|
||||
@commands.command(name="loop", usage="loop", help="Toggles loop mode.")
|
||||
@music.command(name="loop", usage="music loop", help="Toggles loop mode.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -700,7 +716,7 @@ class Music(commands.Cog):
|
||||
await ctx.send(view=CV2("I'm not connected to a voice channel."))
|
||||
|
||||
|
||||
@commands.command(name="pause", usage="pause", help="Pauses the current song.")
|
||||
@music.command(name="pause", usage="music pause", help="Pauses the current song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -721,7 +737,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2(f"{WARNING} Nothing is playing or already paused."))
|
||||
|
||||
@commands.command(name="resume", usage="resume", help="Resumes the paused song.")
|
||||
@music.command(name="resume", usage="music resume", help="Resumes the paused song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -742,7 +758,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("Player is not paused."))
|
||||
|
||||
@commands.command(name="skip", usage="skip", help="Skips the current song.")
|
||||
@music.command(name="skip", usage="music skip", help="Skips the current song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -767,7 +783,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2(f"{WARNING} No song is playing or in the queue to skip."))
|
||||
|
||||
@commands.command(name="shuffle", usage="shuffle", help="Shuffles the queue.")
|
||||
@music.command(name="shuffle", usage="music shuffle", help="Shuffles the queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -787,7 +803,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("Queue is empty."))
|
||||
|
||||
@commands.command(name="stop", usage="stop", help="Stops the current song and clears the queue.")
|
||||
@music.command(name="stop", usage="music stop", help="Stops the current song and clears the queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -810,7 +826,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("Nothing is playing to stop."))
|
||||
|
||||
@commands.command(name="volume", aliases=["vol"], usage="volume <level>", help="Sets the volume of the player.")
|
||||
@music.command(name="volume", aliases=["vol"], usage="music volume <level>", help="Sets the volume of the player.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -834,7 +850,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("Bot is not connected to a voice channel."))
|
||||
|
||||
@commands.command(name="queue", usage="queue", help="Shows the current queue.")
|
||||
@music.command(name="queue", usage="music queue", help="Shows the current queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -860,7 +876,7 @@ class Music(commands.Cog):
|
||||
ctx=ctx)
|
||||
await paginator.paginate()
|
||||
|
||||
@commands.command(name="clearqueue", usage="clearqueue", help="Clears the queue.")
|
||||
@music.command(name="clearqueue", usage="music clearqueue", help="Clears the queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -881,7 +897,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("No queue to clear."))
|
||||
|
||||
@commands.command(name="replay", usage="replay", help="Replays the current song.")
|
||||
@music.command(name="replay", usage="music replay", help="Replays the current song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -902,7 +918,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("No track is currently playing."))
|
||||
|
||||
@commands.command(name="join", aliases=["connect"], usage="join", help="Joins the voice channel.")
|
||||
@music.command(name="join", aliases=["connect"], usage="music join", help="Joins the voice channel.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -913,7 +929,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("You need to join a voice channel first."))
|
||||
|
||||
@commands.hybrid_command(name="disconnect", aliases=["dc", "leave"], usage="disconnect", help="Disconnects the bot from the voice channel.")
|
||||
@music.command(name="disconnect", aliases=["dc", "leave"], usage="music disconnect", help="Disconnects the bot from the voice channel.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -933,7 +949,7 @@ class Music(commands.Cog):
|
||||
else:
|
||||
await ctx.send(view=CV2("Bot is not connected to any voice channel."))
|
||||
|
||||
@commands.command(name="seek", usage="seek <percentage>", help="Seeks to a specific percentage of the song.")
|
||||
@music.command(name="seek", usage="music seek <percentage>", help="Seeks to a specific percentage of the song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
|
||||
@@ -378,7 +378,12 @@ class TicketCog(commands.Cog, name="Ticket System"):
|
||||
await ch.send(content=" ".join(pings), embed=ticket_embed, view=TicketActionsView(self, ch.id, cat_id))
|
||||
await inter.followup.send(f"Your ticket has been successfully created: {ch.mention}", ephemeral=True)
|
||||
|
||||
@commands.hybrid_group(name="ticket", description="Main command group for the ticket system.")
|
||||
@commands.hybrid_group(
|
||||
name="ticket",
|
||||
description="Main command group for the ticket system.",
|
||||
fallback="help",
|
||||
invoke_without_command=True,
|
||||
)
|
||||
@commands.guild_only()
|
||||
async def ticket(self, ctx):
|
||||
if ctx.invoked_subcommand is None: await ctx.send_help(ctx.command)
|
||||
|
||||
@@ -78,7 +78,13 @@ class Welcomer(commands.Cog):
|
||||
""")
|
||||
await db.commit()
|
||||
|
||||
@commands.hybrid_group(invoke_without_command=True, name="greet", help="Shows all the greet commands.")
|
||||
@commands.hybrid_group(
|
||||
invoke_without_command=True,
|
||||
name="greet",
|
||||
description="Configure welcome/greet messages for new members.",
|
||||
help="Shows all the greet commands.",
|
||||
fallback="help",
|
||||
)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
async def greet(self, ctx: commands.Context):
|
||||
|
||||
Reference in New Issue
Block a user