Removing cookies, updating requirements and few changes in music

This commit is contained in:
Rafael Vargas 2022-01-06 19:18:23 -04:00
parent 74d91c15f8
commit ba8cf34b4c
4 changed files with 11 additions and 5 deletions

View File

@ -14,8 +14,6 @@ BOT_PREFIX = '!'
STARTUP_MESSAGE = 'Starting Vulkan...'
STARTUP_COMPLETE_MESSAGE = 'Vulkan is now operating.'
FFMPEG_PATH = 'C:/ffmpeg/bin/ffmpeg.exe'
MAX_PLAYLIST_LENGTH = 50
MAX_API_PHRASES_TRIES = 10
MAX_API_CETUS_TRIES = 10
@ -48,6 +46,7 @@ HELP_FRASE = "Send a randomly phrase, perhaps you get the braba"
HELP_HELP = 'This command :)'
NO_CHANNEL = 'To play some music, connect to any voice channel first.'
NO_GUILD = 'This guild are not connected to Vulkan'
INVALID_INPUT = 'This type of input was too strange, try something better'
DOWNLOADING_ERROR = 'An error occurred while downloading'
SONG_ADDED = 'Song added to the Queue'

View File

@ -2,4 +2,6 @@ discord.py
discord.py[voice]
yt_dlp
spotipy
dotenv
python-decouple
requests
json

View File

@ -11,14 +11,19 @@ class Music(commands.Cog):
self.__guilds = {}
self.__bot: discord.Client = bot
@commands.Cog.listener()
async def on_ready(self):
for guild in self.__bot.guilds:
self.__guilds[guild] = Player(self.__bot, guild)
@commands.command(name="play", help=config.HELP_PLAY, aliases=['p', 'tocar'])
async def play(self, ctx, *args):
user_input = " ".join(args)
player = self.__get_player(ctx)
if player == None:
player = Player(self.__bot, ctx.guild)
self.__guilds[ctx.guild] = player
await self.__send_embed(ctx, description=config.NO_GUILD, colour_name='red')
return
if is_connected(ctx) == None:
result = await player.connect(ctx)