Jump to content
  • 0

Discord linking skript help


booawe

Question

Hello person viewing this. im stuck on this and how do i make it so when you link on one account you cant link with a other discord account with the same minecraft username. please help me

 

discord command ;link [<text>]:
  trigger:
    if arg-1 is not set:
      reply with "Please enter in a valid link code (You can do this in game by /link)!"
    else if {code::%arg-1%} is not set:
      reply with "Your link code is not set. Please link your account with /link ingame!"
    else if {code::%arg-1%} is set:
      if {discord::%discord id of event-member%::player} is not set:
        set {_p} to "%{code::%arg-1%}%" parsed as an offline player
        set {_u} to {_p}'s uuid
        if {linked::%{_u}%} is set:
          reply with "This account is already linked!"
          stop
        set {discord::%discord id of event-member%::player} to {code::%arg-1%}
        set {discord::%discord id of event-member%::uuid} to {uuid::%arg-1%}
        set {discord::%discord id of event-member%} to discord id of event-member
        reply with "%{code::%arg-1%}% has been linked to your Discord account!"
        execute console command "goldencrates givekey %{code::%arg-1%}% daily 3"
        add role with id "843273993699065876" to roles of event-member in event-guild
        set the discord nickname of event-member to "%{code::%arg-1%}%" with event-bot
        delete {code::%arg-1%}
        delete {uuid::%arg-1%}
      else:
        reply with "This account is already linked."


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

hey! you can just add the username to a list once they link, like this: 

add {_p} to {linked::*}

then just check if {linked::*} contains them and then u can stop them. remember this is still skript

 

 

also for the mod thas probably gonna warn me for necroposting, how would I create a new thread??

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...