Discord Link Manifest
Configure Discord linking and role synchronization
Manifest entry configuring how Discord linking behaves inside TypeWriter. The /{commandName} command (with its unlink subcommand) is registered through the engine's [CustomCommandEntry] pipeline, so it follows engine reloads without any reflection.
Felder
| Feld | Typ | Standard | Beschreibung | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commandName | String | discordlink | Command players run to generate a link code; '<command> unlink' removes the link | ||||||||||||||||||||||||||||||||||||||||||||||||
storage | Ref<DiscordLinkArtifactEntry> | — | Artifact entry used to persist link information | ||||||||||||||||||||||||||||||||||||||||||||||||
webhook | Ref<WebhookDefinitionEntry> | — | Webhook used to post link instructions/confirmations | ||||||||||||||||||||||||||||||||||||||||||||||||
bot | DiscordBotSettings | — | Discord Bot configuration for listening to codes and syncing roles
|
| Feld | Typ | Standard | Beschreibung | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enabled | Boolean | false | Enable the bot (required for code verification & role sync) | ||||||||||||
botToken | String | — | Bot token from the Discord Developer Portal | ||||||||||||
guildId | String | — | Discord server (guild) ID where the bot operates | ||||||||||||
messages | DiscordBotVerificationMessages | — | Messages sent by the bot in the verification channel
|
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
success | String | Code accepted for {player}. | Reply posted when a code is accepted (placeholders: {player}, {code})PlatzhalterMehrzeilig |
failure | String | Invalid code for {player}. | Reply posted when a code is rejected/invalid (placeholders: {player}, {code})PlatzhalterMehrzeilig |
verificationChannelIdStringcodeLengthInt6codeValidityMinutesLong10autoOverwriteExistingLinkBooleanfalsenotifyPermissionStringdiscordlink.notifygroupPermissionFormatStringgroup.{group}roleMappingsList<RoleMapping>emptyRoleMapping (2)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
minecraftGroup | String | default | — |
discordRoleId | String | 000000000000000000 | — |
onLinkTriggersList<Ref<TriggerableEntry>>emptymessagesDiscordLinkMessagesDiscordLinkMessages (11)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
alreadyLinked | String | You have already linked your Discord account. | — |
linkInstructions | String | Use the code **{code}** within {duration} on Discord to complete the link. | — |
codeGenerated | String | A new Discord verification code has been generated: {code} (expires in {duration}). | — |
pendingExists | String | You already have a pending code: {code} (expires in {duration}). | — |
linkConfirmed | String | Discord account {discord} is now linked to {player}. | — |
linkRevoked | String | The link with {discord} has been revoked. | — |
unlinkSuccess | String | Your Discord account has been unlinked successfully. | — |
unlinkNoLink | String | You don't have a Discord account linked. | — |
linkUnavailable | String | Discord linking is not configured on this server. | — |
embedLinkedTitle | String | Discord account linked | — |
embedUnlinkedTitle | String | Discord account unlinked | — |
How to use it
This entry registers the player command (commandName, default discordlink) and runs the bot used by the rest of the extension.
- Set
bot.enabled,bot.botTokenandbot.guildId. Without an enabled bot there is no verification and no role sync, and the chat relay, console channel and slash commands cannot work either. - Set
storageto a Discord Link Storage artifact, andwebhookto the destination where link messages are posted (optional). - Set
verificationChannelId: the Discord channel where the player types the code. - The player runs
/discordlink, receives a code ofcodeLengthletters and digits valid forcodeValidityMinutes, and types it in the channel. The bot reacts with a check or a cross, and deletes an accepted code. roleMappingspairs aminecraftGroupwith adiscordRoleId. A player gets the role of the first mapping whose permission (groupPermissionFormat, where{group}is replaced by the group) they hold. Roles are synced when the link is confirmed and each time the player joins.onLinkTriggersruns entries for the player when the link is confirmed, for example a reward.
The messages can use {code}, {duration}, {discord} and {player} depending on the message.