diff --git a/config/config.py b/config/config.py index ceb1851..5583310 100644 --- a/config/config.py +++ b/config/config.py @@ -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' diff --git a/config/cookies/cookies.txt b/config/cookies/cookies.txt deleted file mode 100644 index e69de29..0000000 diff --git a/requirements.txt b/requirements.txt index ce6c122..fb59f1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,6 @@ discord.py discord.py[voice] yt_dlp spotipy -dotenv \ No newline at end of file +python-decouple +requests +json \ No newline at end of file diff --git a/vulkan/commands/Music.py b/vulkan/commands/Music.py index 9a89a25..84c379a 100644 --- a/vulkan/commands/Music.py +++ b/vulkan/commands/Music.py @@ -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)