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:
|
class Settings:
|
||||||
|
|
||||||
def __init__(self, path=default_path):
|
def __init__(self, path=default_path, parse_args=True):
|
||||||
self.path = path
|
self.path = path
|
||||||
self.check_folders()
|
self.check_folders()
|
||||||
self.default_settings = {
|
self.default_settings = {
|
||||||
@ -44,7 +44,7 @@ class Settings:
|
|||||||
|
|
||||||
if "LOGIN_TYPE" in self.bot_settings:
|
if "LOGIN_TYPE" in self.bot_settings:
|
||||||
self.update_old_settings_v2()
|
self.update_old_settings_v2()
|
||||||
|
if parse_args:
|
||||||
self.parse_cmd_arguments()
|
self.parse_cmd_arguments()
|
||||||
|
|
||||||
def parse_cmd_arguments(self):
|
def parse_cmd_arguments(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user