Commit 25feeec5 authored by Fluffy Witch's avatar Fluffy Witch

Nettoyage

parent 9defccdf
......@@ -142,6 +142,7 @@ class Bot(object):
Log.logprint("Now listening for new events...")
# TODO : debug
self.apiMasto.stream_user(listener)
def emergencyContact(self):
......
......@@ -2,7 +2,7 @@ debug = False
debugOutput = "data/debugOutput.txt"
debugInput = "data/debugInput.txt"
debugStatus = "data/statusDebug"
appName = "textAdventureFluffy"
appName = "myTextAdventureApp"
......
......@@ -98,13 +98,11 @@ if(not os.path.exists(Consts.emergencyContactFile) and Consts.proposeEmergencyCo
while(tryFind == True):
Log.logprint("\nOptionally, you can set up an account to contact if something goes wrong.\n")
emergency_contact = input("username@domain.tld of the emergency contact (type \"none\" if you don't want an emergency contact): ").strip()
if(emergency_contact is "none"):
if(emergency_contact == "none"):
tryFind = False
else:
# TODO : apiMasto doesn't work fine
break
api_base_url = open(Consts.apiBaseURLFile).read()
apiMasto = mastodon.Mastodon(client_id = Consts.appCred, access_token = Consts.accountCred,api_base_url = api_base_url)
apiMasto = Mastodon(client_id = Consts.appCred, access_token = Consts.accountCred,api_base_url = api_base_url)
res = apiMasto.account_search(emergency_contact)
if(len(res) == 0):
Log.logprint("\n[ERROR] Zero contact with this name found")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment