added new config values to setup.py and example-config.json
Signed-off-by: SpagettiFisch <johmewu@gmail.com>
This commit is contained in:
parent
82a21ec8c3
commit
4a091fd9fd
2 changed files with 23 additions and 15 deletions
|
|
@ -4,8 +4,8 @@
|
|||
"token": "discord bot token",
|
||||
"pterodactyl_domain": "https://panel.pterodactyl.com/",
|
||||
"pterodactyl_apikey": "user api key",
|
||||
"guild_id": "169256939211980800",
|
||||
"guild_admin_id": "169256939211980800"
|
||||
"mod_roles": [273600757264023553, 1168422950685384765, 286965023249793046],
|
||||
"admin_roles": [807336816863739925]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -13,27 +13,35 @@ if not path.exists('config/config.json'):
|
|||
jsonstructure = {} # Platzhalter
|
||||
jsonstructure['discord'] = []
|
||||
wronginput = False
|
||||
print("Möchtest du das automatisierte Setup nutzen? y/n")
|
||||
print("Do you want to use the automated setup? Y/n")
|
||||
input1 = input()
|
||||
|
||||
if input1.lower().strip() == 'y':
|
||||
print("Bitte geben Sie den Token ein:")
|
||||
print("Please insert your token:")
|
||||
token = input()
|
||||
print("Bitte geben Sie die Pterodactyl Domain ein (Form: https://example.com/ | optional):")
|
||||
print("Please insert your pterodactyl domain here (Format: https://example.com/ | optional):")
|
||||
pterodactyl_domain = input()
|
||||
print("Bitte geben Sie den Pterodactyl API Key ein (optional):")
|
||||
print("Please insert your pterodactyl API key (optional):")
|
||||
pterodactyl_api_key = input()
|
||||
print("Bitte geben Sie die Guild ID ein:")
|
||||
guild_id = input()
|
||||
print("Bitte geben Sie die ID des Admin Channels ein:")
|
||||
guild_admin_id = input()
|
||||
print("Please state how many moderator roles you are using (Roles which are able to modify the whitelist or user):")
|
||||
mod_count = input()
|
||||
mod_roles = []
|
||||
print("Please insert the id of every moderating role:")
|
||||
for i in mod_count:
|
||||
mod_roles.append(input())
|
||||
print("Please state how many admin roles you are using (Roles which are able to stop the bot):")
|
||||
admin_count = input()
|
||||
admin_roles = []
|
||||
print("Please insert the id of every admin role:")
|
||||
for i in admin_count:
|
||||
admin_roles.append(input())
|
||||
|
||||
jsonstructure['discord'].append({
|
||||
'token': token,
|
||||
'pterodactyl_domain': pterodactyl_domain,
|
||||
'pterodactyl_apikey': pterodactyl_api_key,
|
||||
'guild_id': guild_id,
|
||||
'guild_admin_id': guild_admin_id
|
||||
'mod_roles': mod_roles,
|
||||
'admin_roles': admin_roles
|
||||
})
|
||||
|
||||
elif input1.lower().strip() == 'n':
|
||||
|
|
@ -42,8 +50,8 @@ if not path.exists('config/config.json'):
|
|||
'token': 'Platzhalter',
|
||||
'pterodactyl_domain': '',
|
||||
'pterodactyl_apikey': '',
|
||||
'guild_id': '',
|
||||
'guild_admin_id': ''
|
||||
'mod_roles': [],
|
||||
'admin_roles': []
|
||||
})
|
||||
|
||||
else:
|
||||
|
|
@ -55,7 +63,7 @@ if not path.exists('config/config.json'):
|
|||
os.mkdir('config')
|
||||
with open('config/config.json', 'w') as outfile:
|
||||
json.dump(jsonstructure, outfile, indent=4)
|
||||
print("Config erfolgreich erzeugt")
|
||||
print("Config created succesfully")
|
||||
|
||||
if not os.path.exists('whitelist/paths.txt'):
|
||||
if not os.path.exists('whitelist'):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue