'Your Discord account has been linked to your panel account! You may unlink your Discord and panel accounts by reacting in the #verification channel or by deleting your Verification API key.')
logging.info("Success message sent to "+message.author.name+"#"+str(
message.author.discriminator)+" ("+str(
message.author.id)+")"+". User linked to API key "+message.content+" and client_id "+str(
json_response['attributes']['id']))
elifdiscord_id_already_exists:
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']))
elifclient_id_already_exists:
awaitchannel.send(
'Sorry, your panel account is already linked to a Discord account. If you would like to link your panel account to a different Discord account, please unlink your panel account first by deleting its Verification API key and waiting up to 10 minutes.')
logging.info("Duplicate panel 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']))
else:
else:
# Says if API key is the corect # of characters but invalid
awaitchannel.send("Sorry, that appears to be an invalid API key.")
logging.info(
'invalid sent to '+message.author.name+"#"+str(message.author.discriminator)+" ("+str(
message.author.id)+")")
awaitmember.remove_roles(role)
else:
data['users'].pop(i)
json_dumps=json.dumps(data,indent=2)
file=open('users.json','w')
file.write(json_dumps)
file.close()
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:
else:
# Says this if API key is incorrect # of characters
awaitchannel.send(
'Sorry, that doesn\'t appear to be an API token. An API token should be a long string resembling this: ```yQSB12ik6YRcmE4d8tIEj5gkQqDs6jQuZwVOo4ZjSGl28d46```')
logging.info("obvious incorrect sent to "+message.author.name+"#"+str(