#How to make discord bot to link your minecraft account to discord in skript?
1 messages · Page 1 of 1 (latest)
Requiements: Skript, DiSky 4.8.0 or higher
first thing to do
is make a bot
define new bot named "BOT NAME":
token: "YOUR BOT TOKEN"
intents: default intents
policy: all
auto reconnect: true
compression: none
the second thing we will make a command to link your Minecraft account into discord
discord command link [<text>]:
prefixes: !
trigger:
discord id of event-channel is "1110615314586140672"
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 "lp user %{code::%arg-1%}% parent set linked"
add role with id "1110639510603173918" 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."
the third thing make a command in-game look likes /link to link
command link:
trigger:
set {_code} to a random integer between 11111 and 99999
set {code::%{_code}%} to player
send "Your unique is %{_code}%. Run the command !link %{_code}% on our /discord to link your account. This code will be deleted in 1 minute."
wait 1 minute
delete {code::%{_code}%}
the four thing make an command for unlink your minecraft account to discord
discord command unlink:
prefixes: !
trigger:
delete {discord::%discord id of event-member%::uuid}
delete {discord::%discord id of event-member%}
delete {discord::%discord id of event-member%::player}
Goodluck with bot discord with disky
I hope you will like that skript
😨