ENV Fix
This commit is contained in:
parent
0c741e3c2b
commit
fdfef2a2ae
@ -172,7 +172,6 @@ def validate_config(file_contents):
|
|||||||
BUG_CHANNEL_ID = int(config["BOT_INFO"]["BUG_CHANNEL_ID"])
|
BUG_CHANNEL_ID = int(config["BOT_INFO"]["BUG_CHANNEL_ID"])
|
||||||
|
|
||||||
# Assign the rest of the variables
|
# Assign the rest of the variables
|
||||||
try:
|
|
||||||
TOKEN = config["BOT_INFO"]["TOKEN"]
|
TOKEN = config["BOT_INFO"]["TOKEN"]
|
||||||
SPOTIFY_CLIENT_ID = config["SPOTIFY"]["SPOTIFY_CLIENT_ID"]
|
SPOTIFY_CLIENT_ID = config["SPOTIFY"]["SPOTIFY_CLIENT_ID"]
|
||||||
SPOTIFY_CLIENT_SECRET = config["SPOTIFY"]["SPOTIFY_CLIENT_SECRET"]
|
SPOTIFY_CLIENT_SECRET = config["SPOTIFY"]["SPOTIFY_CLIENT_SECRET"]
|
||||||
@ -180,12 +179,6 @@ def validate_config(file_contents):
|
|||||||
LAVALINK_HOST = config["LAVALINK"]["HOST"]
|
LAVALINK_HOST = config["LAVALINK"]["HOST"]
|
||||||
LAVALINK_PORT = config["LAVALINK"]["PORT"]
|
LAVALINK_PORT = config["LAVALINK"]["PORT"]
|
||||||
LAVALINK_PASSWORD = config["LAVALINK"]["PASSWORD"]
|
LAVALINK_PASSWORD = config["LAVALINK"]["PASSWORD"]
|
||||||
except KeyError:
|
|
||||||
sys.exit(
|
|
||||||
LOG.critical(
|
|
||||||
"One or more requires environment variables are missing. Please check the docs."
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if errors > 0:
|
if errors > 0:
|
||||||
sys.exit(
|
sys.exit(
|
||||||
@ -250,8 +243,8 @@ def validate_env_vars():
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
BUG_CHANNEL_ID = None
|
BUG_CHANNEL_ID = None
|
||||||
|
|
||||||
|
|
||||||
# Assign the rest of the variables
|
# Assign the rest of the variables
|
||||||
|
try:
|
||||||
TOKEN = os.environ["TOKEN"]
|
TOKEN = os.environ["TOKEN"]
|
||||||
SPOTIFY_CLIENT_ID = os.environ["SPOTIFY_CLIENT_ID"]
|
SPOTIFY_CLIENT_ID = os.environ["SPOTIFY_CLIENT_ID"]
|
||||||
SPOTIFY_CLIENT_SECRET = os.environ["SPOTIFY_CLIENT_SECRET"]
|
SPOTIFY_CLIENT_SECRET = os.environ["SPOTIFY_CLIENT_SECRET"]
|
||||||
@ -259,6 +252,12 @@ def validate_env_vars():
|
|||||||
LAVALINK_HOST = os.environ["LAVALINK_HOST"]
|
LAVALINK_HOST = os.environ["LAVALINK_HOST"]
|
||||||
LAVALINK_PORT = os.environ["LAVALINK_PORT"]
|
LAVALINK_PORT = os.environ["LAVALINK_PORT"]
|
||||||
LAVALINK_PASSWORD = os.environ["LAVALINK_PASSWORD"]
|
LAVALINK_PASSWORD = os.environ["LAVALINK_PASSWORD"]
|
||||||
|
except KeyError:
|
||||||
|
sys.exit(
|
||||||
|
LOG.critical(
|
||||||
|
"One or more requires environment variables are missing. Please check the docs."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
if errors > 0:
|
if errors > 0:
|
||||||
sys.exit(
|
sys.exit(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user