fix variable name
This commit is contained in:
parent
e494990673
commit
9d56e1d3cd
2 changed files with 5 additions and 5 deletions
|
@ -12,13 +12,13 @@ customPrefix = keys["PREFIX"]
|
|||
client = commands.Bot(command_prefix = customPrefix, case_insensitive = True, intents = discord.Intents.all())
|
||||
slash = SlashCommand(client, sync_commands = True)
|
||||
|
||||
if keys["DEACTIVATION"] != "None":
|
||||
if keys["DEACTIVATE"] != "None":
|
||||
path = getcwd()
|
||||
for file in keys["DEACTIVATION"]:
|
||||
for file in keys["DEACTIVATE"]:
|
||||
try:
|
||||
rename(f"{path}/cogs/{file}.py", f"{path}/cogs/-{file}.py") # désactivation
|
||||
except:
|
||||
print(f"\nNo file {file} found, check your \"DEACTIVATION\" variable.")
|
||||
print(f"\nNo file {file} found, check your \"DEACTIVATE\" variable.")
|
||||
exit(1)
|
||||
|
||||
for file in listdir("cogs"):
|
||||
|
|
|
@ -172,11 +172,11 @@ def load(variables):
|
|||
for var in variables:
|
||||
try:
|
||||
res = environ[var]
|
||||
if var == "DEACTIVATION":
|
||||
if var == "DEACTIVATE":
|
||||
res = list(set(res.split(',')) - {""}) # create a list for the cogs we need to deactivate and remove blank channels and doubles
|
||||
keys[var] = res
|
||||
except KeyError:
|
||||
if var == "DEACTIVATION":
|
||||
if var == "DEACTIVATE":
|
||||
keys[var] = "None"
|
||||
else:
|
||||
print(f"Please set the environment variable {var} (.env file supported)")
|
||||
|
|
Reference in a new issue