decoupled lavalink creation from cogs.music

This commit is contained in:
2021-11-20 00:37:17 +01:00
parent 1697002666
commit 8504d6abfd
5 changed files with 24 additions and 21 deletions
+6
View File
@@ -87,6 +87,12 @@ class TuneBot(commands.Bot):
print(f"Version: {discord.__version__}")
print(f"Invite: {self.invite_link}")
ll = self.config["lavalink"]
self.lavalink = lavalink.Client(self.user.id)
self.lavalink.add_node(
ll["host"], ll["port"], ll["password"], ll["region"], ll["name"]
)
def process_colours(self, colors: Dict[str, str]) -> Dict[str, Color]:
colour_dict: Dict[str, Color] = {}
for name, color in colors.items():