Skip to content

Linking clans & accounts

ClashDuke has two kinds of links, and it’s worth knowing the difference:

Clan links

Attach a clan to your server so ClashDuke tracks it and its feeds, reminders, and boards become available. Done with /setup clan.

Account links

Attach a player account to a Discord member, so autoroles, rosters, and “who is this?” all work. Done with /link.

Start tracking a clan (Manage Server or a manager role):

/setup clan tag:#2PP0JCCL alias:main category:War
Option Type Required Description
tag string Yes Clan tag
alias string No Short alias, usable anywhere a clan is asked for
category string No Assign to an existing category (by name)

Tracking begins within about a minute. Once linked, most clan commands can find the clan automatically, so you can leave the tag off.

Command What it does
/setup clan Link a clan and start tracking
/clans List the clans linked on this server, grouped how you like
/alias set / /alias remove / /alias list Short names for clans
/category create / assign / edit / delete / list Organize clans into categories
/removeclan Untrack a clan — stops feeds & reminders but keeps stored history

Lists every clan linked on the server, grouped the way you choose.

Option Type Required Description
type choice No Overview · Categories (default) · CWL Leagues · Capital Leagues · Location · TH Requirement
category string (autocomplete) No Only show clans in this category
/clans type:CWL Leagues

The board is interactive — switch the grouping from the View by… menu without re-running the command.

/link connects Clash of Clans accounts to Discord members. A member can link up to 25 accounts, and one is marked as their main (⭐).

/link create — link an account
Option Type Required Description
player_tag string Yes Player tag
user user No Who to link (staff only; default is you)
api_token string No In-game API token — verifies or claims the account
default boolean No Set as main account
/link create player_tag:#2PP api_token:abcd1234 default:True

Linking to another member requires Manage Server.

/link list — accounts or clan coverage

With no options, lists your own linked accounts. Pass user to view someone else’s, or clan to see a coverage board showing which clan members are (and aren’t) linked.

Option Type Required Description
user user No Whose accounts to list (default you)
clan string (autocomplete) No Show a clan roster with who is / isn’t linked
sort choice No Name · Tag · Username · Town Hall
/link list clan:#2PP0JCCL sort:Town Hall
/link default — pick your main account
Option Type Required Description
player_tag string (autocomplete) No Account to set as main (leave empty to pick from a menu)
/link delete — unlink an account

Unlinks your own account, or anyone’s with Manage Server.

Option Type Required Description
player_tag string (autocomplete) Yes Player tag, or pick a linked account
/link button — self-service link button

Posts a Link Account button members can use themselves (Manage Server). No options.

/link greeting — welcome message on link

A message sent when a member successfully links an account (Manage Server).

  • /link greeting set message:... — supports {player} {clan} {user} {th}
  • /link greeting clear
  • /link greeting show
/link welcome — onboarding kit

A reusable Link / Refresh Roles / To-Do / My Rosters button message (Manage Server).

  • /link welcome post channel:... — post the kit now
  • /link welcome auto channel:... — auto-post it when a member joins (needs the Server Members intent)
  • /link welcome disable
  • /link welcome show

Linking works without any proof, but verifying with an in-game API token locks an account to a member. A verified link can only be moved by another valid token — server staff can’t reclaim it.

Open the game settings

In Clash of Clans, go to Settings → More Settings → API Token.

Copy the token

Copy the token shown at the bottom of that screen.

Use it when linking

Paste it into api_token on /link create, or use /verify.

Option Type Required Description
player_tag string Yes Player tag
token string Yes Settings → More Settings → API Token
/verify player_tag:#2PP token:abcd1234

Verifying proves ownership and claims the account from any previous owner.