lang + small error fix

This commit is contained in:
piair 2023-05-08 20:56:55 +02:00
parent 4aef2bf948
commit 1a4ed4f4e7
4 changed files with 23 additions and 11 deletions

27
main.py
View File

@ -34,7 +34,7 @@ def confirm(texte, default = False):
return False return False
return default return default
lang = "fr" lang = "en"
text = {"fr" : { text = {"fr" : {
"compte" : "entrer l'adresse mail du compte ", "compte" : "entrer l'adresse mail du compte ",
@ -55,6 +55,24 @@ text = {"fr" : {
"proxye" : "voulez vous utiliser un proxy ", "proxye" : "voulez vous utiliser un proxy ",
"proxyl" : "entrez le lien du proxy ", "proxyl" : "entrez le lien du proxy ",
"proxyp" : "entrez le port du proxy " "proxyp" : "entrez le port du proxy "
},
"en" : {
"compte" : "enter email of an account",
"mdp" : "enter password of this account ",
"next" : "Add another account ? ",
"finc" : "Adding accounts ",
"ajout" : "Accounts added ",
"discorde" : "Do you want to use discord ? (Highly recommended as it's untested without)",
"w1" : "Enter Webhook link for sending points everyday",
"w2" : "Enter Webhook link for errors ",
"msqle" : "Do you want to use a database ? ",
"msqll" : "database link ",
"msqlu" : "database username ",
"msqlp" : "database password ",
"msqlt" : "database name (should be MsRewards) ",
"proxye" : "Do you want to use a proxy ",
"proxyl" : "Proxy address ",
"proxyp" : "Proxy port "
} }
} }
@ -92,7 +110,7 @@ def edit_config_txt(ligne, contenu):
txt = f.readlines() txt = f.readlines()
f.close() f.close()
if txt.count(txt) >1: if txt.count(txt) >1:
raise NameError("il y a plus d'une occurence, echec de la modification") raise NameError("Fail")
for i in range(len(txt)) : for i in range(len(txt)) :
name = txt[i].split(" = ")[0] name = txt[i].split(" = ")[0]
@ -106,16 +124,11 @@ def edit_config_txt(ligne, contenu):
def setup_settings(): def setup_settings():
general()
discord() discord()
proxy() proxy()
sql() sql()
def general():
if confirm(t["fidelity"]):
lien = input(t["lien"])
edit_config_txt('FidelityLink',lien)
def discord(): def discord():

View File

@ -152,12 +152,12 @@ g.sql_database = config["SQL"]["database"]
try : try :
g.database_error_override = config["OTHER"]["database_override"] g.database_error_override = config["OTHER"]["database_override"] == "True"
except : except :
pass pass
try : try :
g.fast = config["OTHER"]["fast"] g.fast = config["OTHER"]["fast"] == "True"
except : except :
pass pass
h = open(g.mot_path, "r", encoding="utf-8") h = open(g.mot_path, "r", encoding="utf-8")

View File

@ -5,7 +5,6 @@ logpath = /your/path/to/loginandpass.csv
[SETTINGS] [SETTINGS]
FidelityLink = Null
embeds = False embeds = False
Headless = True Headless = True

View File

@ -1 +1 @@
v5.10.6 v5.10.7