diff --git a/Commands/Control.py b/Commands/Control.py index cd0e827..97ead7f 100644 --- a/Commands/Control.py +++ b/Commands/Control.py @@ -102,6 +102,7 @@ class Control(commands.Cog): @commands.command(name='invite', help=helper.HELP_INVITE, description=helper.HELP_INVITE_LONG) async def invite_bot(self, ctx): invite_url = self.__config.INVITE_URL.format(self.__bot.user.id) + print(invite_url) txt = self.__config.INVITE_MESSAGE.format(invite_url, invite_url) embed = Embed( diff --git a/Controllers/QueueController.py b/Controllers/QueueController.py index 8303f91..8a5014f 100644 --- a/Controllers/QueueController.py +++ b/Controllers/QueueController.py @@ -1,3 +1,4 @@ +import asyncio from discord.ext.commands import Context from discord import Client from Controllers.AbstractController import AbstractController @@ -22,7 +23,7 @@ class QueueController(AbstractController): embed = self.embeds.EMPTY_QUEUE() return ControllerResponse(self.ctx, embed) - await self.__down.preload(songs_preload) + asyncio.create_task(self.__down.preload(songs_preload)) if self.player.playlist.looping_all: title = self.messages.ALL_SONGS_LOOPING diff --git a/Exceptions/Exceptions.py b/Exceptions/Exceptions.py index beb7efa..b8af548 100644 --- a/Exceptions/Exceptions.py +++ b/Exceptions/Exceptions.py @@ -1,4 +1,5 @@ from Config.Config import Configs +from Config.Messages import Messages class Error(Exception): @@ -18,9 +19,9 @@ class Error(Exception): class ImpossibleMove(Error): def __init__(self, message='', title='', *args: object) -> None: - config = Configs() + message = Messages() if title == '': - title = config.IMPOSSIBLE_MOVE + title = message.IMPOSSIBLE_MOVE super().__init__(message, title, *args) diff --git a/config/Messages.py b/config/Messages.py index 4ec25d8..c469e6f 100644 --- a/config/Messages.py +++ b/config/Messages.py @@ -66,7 +66,7 @@ class Messages(Singleton): self.BAD_COMMAND_TITLE = 'Misuse of command' self.BAD_COMMAND = f'❌ Bad usage of this command, type {configs.BOT_PREFIX}help "command" to understand the command better' self.VIDEO_UNAVAILABLE = '❌ Sorry. This video is unavailable for download.' - self.ERROR_DUE_LOOP_ONE_ON = f'❌ This command cannot be executed with loop one activated. Use {self.BOT_PREFIX}loop off to disable loop.' + self.ERROR_DUE_LOOP_ONE_ON = f'❌ This command cannot be executed with loop one activated. Use {configs.BOT_PREFIX}loop off to disable loop.' class SearchMessages(Singleton): diff --git a/config/config.py b/config/config.py index e3c3979..964e3e0 100644 --- a/config/config.py +++ b/config/config.py @@ -20,8 +20,7 @@ class Configs(Singleton): self.MAX_SONGS_HISTORY = 15 self.INVITE_MESSAGE = """To invite Vulkan to your own server, click [here]({}). - - Or use this direct URL: ({})""" + Or use this direct URL: {}""" self.MY_ERROR_BAD_COMMAND = 'This string serves to verify if some error was raised by myself on purpose' - self.INVITE_URL = 'https://discordapp.com/oauth2/authorize?client_id={}&scope=bot>' + self.INVITE_URL = 'https://discordapp.com/oauth2/authorize?client_id={}&scope=bot'