Initial work on reset discord account.

This commit is contained in:
Adarnof
2015-11-30 23:41:44 +00:00
parent a6447d3596
commit d9ffaa5e50
4 changed files with 26 additions and 6 deletions

View File

@@ -227,13 +227,12 @@ class DiscordManager:
def delete_user(username):
try:
user_id = DiscordAPIManager.get_user_id(username)
except:
DiscordAPIManager.kick_user(settings.DISCORD_SERVER_ID, user_id)
except KeyError:
#user does not exist
return True
try:
DiscordAPIManager.kick_user(settings.DISCORD_SERVER_ID, user_id)
return True
except:
#something went wrong
return False
@staticmethod