mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Settings] Add constructor parameter to skip argparse (#550)
This commit is contained in:
parent
0330e4f221
commit
abd154861d
@ -10,7 +10,7 @@ default_path = "data/red/settings.json"
|
||||
|
||||
class Settings:
|
||||
|
||||
def __init__(self, path=default_path):
|
||||
def __init__(self, path=default_path, parse_args=True):
|
||||
self.path = path
|
||||
self.check_folders()
|
||||
self.default_settings = {
|
||||
@ -44,8 +44,8 @@ class Settings:
|
||||
|
||||
if "LOGIN_TYPE" in self.bot_settings:
|
||||
self.update_old_settings_v2()
|
||||
|
||||
self.parse_cmd_arguments()
|
||||
if parse_args:
|
||||
self.parse_cmd_arguments()
|
||||
|
||||
def parse_cmd_arguments(self):
|
||||
parser = argparse.ArgumentParser(description="Red - Discord Bot")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user