hook up discord

set up the one discord bot every project shares, tell smith where its token comes from, bind a project to a server, and check the connection from the discord page.

smith's discord bridge puts gates, launch cards and proposals in a channel and takes your presses there. it's one bot that serves every project that binds a server of its own. the docs don't cover making the bot in discord's own settings, so this guide starts from a bot you already have.

01the desk side#

the desk.json block discord is the one bot every bound project shares, and its operator. it holds no token. the keys are on discord:

the token is read in this order. with no discord block, or an empty operator, the feature is off and the reason says which. otherwise the variable named by token_env is read, and a non-empty value wins. failing that, token_file is read and its trailing line breaks are trimmed. an unset, unreadable or empty file leaves the feature off. the reason text never contains the token. that's all under the token and desk.json.

02bind a project to a server#

a project's discord block is in its local half, so it's machine-local. see two halves. the conductor can't write it directly: it drafts the change with propose_config_edit and you click. the fields are:

the full list, with the slash commands /research, /status and /tickets, is under a project binds a server. audiences and members have their own sections, audiences and members.

03check it#

each project with its box on gets a discord page. a bound server has six checks there: bot token, bot in server, message content, server members, commands and posting. each is ok, fail, warn or not run, with what it found and how to fix a failure. the message content and server members intents are privileged, and you set them in the discord developer portal. posting is only tested when you press test. see the discord page.

the conductor's discord_state tool says in plain words whether the bridge is on, on with cards only, off, missing a token, or not set up. a press from discord is the same press as in the window, and the thread says "(from discord)". see one bot.

04switching it on and off#

the bridge is switched with a propose_discord card, and you click it. it needs chat to switch on when none is set. see the cards.

05where to go next#

discord has the whole page, desk.json every key, and environment variables the token variable.