awaitchannel.send('Sorry, your Discord account is already linked to a panel account. If you would like to link your Discord account to a different panel account, please unlink your Discord account first by reacting in the #verification channel.')
logging.info("Duplicate Discord message sent to "+message.author.name+"#"+str(message.author.discriminator)+" ("+str(message.author.id)+")"+" for using API key "+message.content+" linked to client_id "+str(json_response['attributes']['id']))
# Makes json pretty with indentations and stuff, then writes to file
#Says if API key is the corect # of characters but invalid
awaitchannel.send("Sorry, that appears to be an invalid API key.")
@ -338,24 +318,6 @@ async def updater():
awaitmember.edit(roles=[])
logging.info("removed discord_id "+str(client['discord_id'])+" with client_id "+str(client['client_id'])+" and INVALID client_api_key "+client['client_api_key'])
else:
# file = open('oldusers.json', 'r')
# olddata = json.load(file)
# file.close()
# Checks if user exists. If so, skips adding them to users.json
# already_exists = False
# for olduser in olddata['users']:
# if olduser['discord_id'] == json_response['attributes']['id']: