From a45ccb657e1acd08cd937cb76aa45c525d40a623 Mon Sep 17 00:00:00 2001 From: Carsten Burgard Date: Sun, 13 Feb 2022 12:02:49 +0100 Subject: [PATCH] make dependency on lyricsgenius optional by moving import --- PlexBot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlexBot/bot.py b/PlexBot/bot.py index 9dbb53c..efc51b3 100644 --- a/PlexBot/bot.py +++ b/PlexBot/bot.py @@ -6,7 +6,6 @@ from urllib.request import urlopen import requests import discord -import lyricsgenius from async_timeout import timeout from discord import FFmpegPCMAudio from discord.ext import commands @@ -182,6 +181,7 @@ class Plex(commands.Cog): self.bot_prefix = bot.command_prefix if kwargs["lyrics_token"]: + import lyricsgenius self.genius = lyricsgenius.Genius(kwargs["lyrics_token"]) else: plex_log.warning("No lyrics token specified, lyrics disabled")