Implement slash command synchronization features in environment files and update command definitions to hybrid commands across various cogs. Enhance command registration for improved user experience and streamline command handling in the bot.
This commit is contained in:
@@ -585,7 +585,7 @@ 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_command(name="play", aliases=['p'], usage="play <query>", help="Plays a song or playlist.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -594,7 +594,7 @@ class Music(commands.Cog):
|
||||
await self.play_source(ctx, query)
|
||||
|
||||
|
||||
@commands.command(name="search", usage="search <query>", help="Searches music from multiple platforms.")
|
||||
@commands.hybrid_command(name="search", usage="search <query>", help="Searches music from multiple platforms.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -606,7 +606,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.")
|
||||
@commands.hybrid_command(name="nowplaying", aliases=["nop"], usage="nowplaying", help="Shows the info about current playing song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -659,7 +659,7 @@ class Music(commands.Cog):
|
||||
|
||||
await ctx.send(view=view)
|
||||
|
||||
@commands.command(name="autoplay", usage="autoplay", help="Toggles autoplay mode.")
|
||||
@commands.hybrid_command(name="autoplay", usage="autoplay", help="Toggles autoplay mode.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -679,7 +679,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.")
|
||||
@commands.hybrid_command(name="loop", usage="loop", help="Toggles loop mode.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -700,7 +700,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.")
|
||||
@commands.hybrid_command(name="pause", usage="pause", help="Pauses the current song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -721,7 +721,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.")
|
||||
@commands.hybrid_command(name="resume", usage="resume", help="Resumes the paused song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -742,7 +742,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.")
|
||||
@commands.hybrid_command(name="skip", usage="skip", help="Skips the current song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -767,7 +767,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.")
|
||||
@commands.hybrid_command(name="shuffle", usage="shuffle", help="Shuffles the queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -787,7 +787,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.")
|
||||
@commands.hybrid_command(name="stop", usage="stop", help="Stops the current song and clears the queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -810,7 +810,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.")
|
||||
@commands.hybrid_command(name="volume", aliases=["vol"], usage="volume <level>", help="Sets the volume of the player.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -834,7 +834,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.")
|
||||
@commands.hybrid_command(name="queue", usage="queue", help="Shows the current queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -860,7 +860,7 @@ class Music(commands.Cog):
|
||||
ctx=ctx)
|
||||
await paginator.paginate()
|
||||
|
||||
@commands.command(name="clearqueue", usage="clearqueue", help="Clears the queue.")
|
||||
@commands.hybrid_command(name="clearqueue", usage="clearqueue", help="Clears the queue.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -881,7 +881,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.")
|
||||
@commands.hybrid_command(name="replay", usage="replay", help="Replays the current song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -902,7 +902,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.")
|
||||
@commands.hybrid_command(name="join", aliases=["connect"], usage="join", help="Joins the voice channel.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -933,7 +933,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.")
|
||||
@commands.hybrid_command(name="seek", usage="seek <percentage>", help="Seeks to a specific percentage of the song.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
|
||||
Reference in New Issue
Block a user