Kotoba

Where to start

What Kotoba isWho she is and where she runs, in one page
InstallingOne package, two commands
First runA key, a model, her first words
The approval gateHow she asks before she acts
The two voice modesLocal voice, or the agent tunnel
The soul fileChange who she is
RoadmapWhat grows next, and what was cut on purpose

Or a section

↑↓ move openesc close124 pages
All pages

Discord2 of 10

Setting her up on Discord

About 3 minutes to read

On this page

Three things happen on Discord's side: you create the application, you turn on the two intents she asks for, and you invite her with the permissions you want her to have. Installing and configuring her is the next page.

1. Create the application and the bot

In the Discord Developer Portal, create a new application and open its Bot tab. Take the bot token from there and keep it to hand: you give it to her on the next page, and you never need to paste it into a file.

She registers no slash commands, so the bot scope is the only one she uses when you invite her.

2. Turn on the two privileged intents

Portal → Bot → Privileged Gateway Intents: turn on Message Content and Server Members.

She asks the gateway for exactly six intents:

IntentPrivilegedWhat breaks without it
guildsnoShe knows about no servers at all
guild_messagesnoShe never sees a message in a server
dm_messagesnoShe never sees a DM
voice_statesnoShe cannot see who is in a voice channel, or which one you are in
message_contentyesEvery message arrives with empty content: a room of blank lines
membersyesNo member list — she cannot resolve a name, read someone's permissions, or act on a person

presences is deliberately off. Nothing in the code reads it and it is the heaviest cache Discord offers.

Because she asks for both privileged intents at connect time, Discord refuses the whole connection if either is off. kotoba discord catches that, prints the two names and the portal path, and exits rather than starting half-working.

3. Invite her

Invite her with the bot scope and the permissions you actually want her to have. The first block is all she needs to talk; everything below it is server management, so grant only what you want possible.

What she doesDiscord permission it needs
Read a channel and answer in it, reply to the message that called herView Channels, Send Messages, Read Message History
Post a message in another channel, or open a post in a forumSend Messages there, and Create Posts in a forum
Show an approval card (an embed with two buttons)Embed Links
Attach a file from her workspaceAttach Files
Create, rename, move and delete channels, categories and forums; set topics, slowmode and forum tagsManage Channels
Create, rename, recolour and delete roles; give and take roles; make a channel private or publicManage Roles
Rename a memberManage Nicknames
Time somebody outModerate Members
Kick, banKick Members, Ban Members
Move somebody between voice channelsMove Members
Join a voice channel and speak in itConnect, Speak

Three limits are hers, not Discord's, and they hold whatever you grant:

  • She never hands out Administrator. A batch that asks for it is refused with a sentence, and the permission is stripped even from a direct set_permissions call.
  • She cannot touch a role at or above her own, nor act on a person whose top role is at or above hers, nor on the server owner. She checks this before showing you a card, so an impossible plan is refused in words instead of failing halfway through.
  • A permission she does not hold comes back as a sentence, not a crash: the batch stops at the first refusal and she tells you where it stopped.

4. Choose whether she needs voice

Voice needs more than the invite: the voice extra, an ElevenLabs key and, on Linux and macOS, the system libopus library. Voice in a room covers it. Text works without any of that.