mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Adding shuffle musics command
This commit is contained in:
parent
b5974b28e5
commit
43bb87f997
@ -86,6 +86,7 @@ class Music(commands.Cog):
|
||||
await self.__send_embed(ctx, description='Houve um problema no download dessa música, tente novamente', colour_name='blue')
|
||||
|
||||
elif not self.__playing : # If not playing
|
||||
|
||||
await self.__send_embed(ctx, description=f'Você adicionou a música **{song.title}** à playlist', colour_name='blue')
|
||||
|
||||
else: # If playing
|
||||
@ -195,6 +196,15 @@ class Music(commands.Cog):
|
||||
)
|
||||
await ctx.send(embed=embedvc)
|
||||
|
||||
@commands.command(name='shuffle', help='Altera aleatoriamente a ordem das músicas')
|
||||
async def shuffle(self, ctx):
|
||||
self.__playlist.shuffle()
|
||||
songs = self.__playlist.songs_to_preload
|
||||
|
||||
await self.__downloader.preload(songs)
|
||||
|
||||
await self.__send_embed(ctx, description='Musicas embaralhadas', colour_name='blue')
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Music(bot))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user