diff --git a/modular_splurt/code/modules/discord/accountlink.dm b/modular_splurt/code/modules/discord/accountlink.dm index 2779ae28e9..28d98f5c2b 100644 --- a/modular_splurt/code/modules/discord/accountlink.dm +++ b/modular_splurt/code/modules/discord/accountlink.dm @@ -26,10 +26,15 @@ else + var/existing_id = SSdiscord.lookup_id(usr?.ckey) + //Do not create a new entry if they already have a linked account + if(existing_id) + message = "You already have a linked account with discord ID ([existing_id]). If you desire to change your account please contact staff." // Will generate one if an expired one doesn't exist already, otherwise will grab existing token - var/one_time_token = SSdiscord.get_or_generate_one_time_token_for_ckey(ckey) - SSdiscord.reverify_cache[usr.ckey] = one_time_token - message = "Your one time token is: \"[one_time_token]\". You can now verify yourself in discord by using the command \"[prefix][command] [one_time_token]\"" + else + var/one_time_token = SSdiscord.get_or_generate_one_time_token_for_ckey(ckey) + SSdiscord.reverify_cache[usr.ckey] = one_time_token + message = "Your one time token is: \"[one_time_token]\". You can now verify yourself in discord by using the command \"[prefix][command] [one_time_token]\"" //Now give them a browse window so they can't miss whatever we told them var/datum/browser/window = new/datum/browser(usr, "discordverification", "Discord verification")