Discord setup
Each character is one Discord application.
- In the Discord Developer Portal create an application, copy the token on the Bot page and put it in
.env(e.g.DISCORD_LUNA_TOKEN: …). - Under Bot → Privileged Gateway Intents enable Message Content Intent, otherwise the bot cannot read ordinary messages.
- Under OAuth2 → URL Generator select
botandapplications.commands, with the permissions View Channels, Send Messages, Read Message History, Send Messages in Threads, Attach Files, Add Reactions. Administrator is not needed. - Invite the bot with the generated link and put the server and channel IDs in
discord.guilds(right-click → Copy ID in developer mode).
On startup each character registers its slash commands in its servers. Replies use Discord Markdown, are split above 2000 characters, and never trigger @ notifications.
