mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 19:57:48 +00:00
take bot config as argument
This commit is contained in:
@@ -110,7 +110,11 @@ class ChristmasBot(commands.Bot):
|
||||
await self.change_presence(activity=activity)
|
||||
|
||||
|
||||
config = json.load(open("config.json", "r", encoding="utf-8"))
|
||||
config_path = "config.json"
|
||||
if len(sys.argv) > 1:
|
||||
config_path = sys.argv[1]
|
||||
|
||||
config = json.load(open(config_path, "r", encoding="utf-8"))
|
||||
redis_prefix = config["redis_prefix"]
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user