This Skript code allows players to link their Minecraft account to their Discord account. Once a player types the /link command in-game and enters the unique code provided by the Discord bot, their Discord account will be linked to their Minecraft account. The player's nickname on the Discord server will be updated to their Minecraft username, and they will receive a reward for linking their accounts.
To unlink their Minecraft account from their Discord account, players can use the /unlink command in-game. This will remove the link between their accounts and revert their Discord nickname to its original state.
This code requires the use of the Discord bot API and the Skript plugin for Minecraft