Merge branch 'dev' into database-rewrite

This commit is contained in:
2021-11-22 10:53:00 +01:00
4 changed files with 20 additions and 19 deletions
+3 -1
View File
@@ -13,10 +13,12 @@ if TYPE_CHECKING:
from bot import TuneBot
from tunebot import PlaylistSource
from tunebot import AutoJoin
from utils.classes import BaseCog
class CustomContext(commands.Context):
bot: "TuneBot"
cog: "BaseCog"
@property
def redis(self) -> Redis:
@@ -24,7 +26,7 @@ class CustomContext(commands.Context):
@property
def player(self) -> DefaultPlayer:
if hasattr(self.bot, "lavalink"):
if self.cog.is_lavalink_ready():
return self.bot.lavalink.player_manager.get(self.guild.id)
raise CommandInvokeError("Lavalink is still starting up.")