mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 19:57:48 +00:00
Merge branch 'dev' into database-rewrite
This commit is contained in:
+3
-1
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user