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

Discord4 of 10

When she answers, and what she writes

About 4 minutes to read

On this page

A bot that answers every line in a busy channel is a bot people mute. In a server she reads everything and answers five things.

The five ways to reach her in a server

  1. A mention. @her in the message. She reads the raw text as well as Discord's parsed mention list, because a mention Discord could not resolve against its member cache is dropped from that list silently — a real mention that reaches her as an empty list is her saying nothing with no error anywhere.
  2. A mention of a role she wears. Typing her name offers two things: the bot, and the integration role that carries the same name. Half a room picks the role. Its token is <@&id> and it appears in no user mention list. @everyone is excluded.
  3. A reply to one of her own messages.
  4. Any message in a home channel — a channel id you put in KOTOBA_DISCORD_HOME_CHANNELS.
  5. A follow-up inside 90 seconds, from the same person, in the same channel she just answered them in, if nobody else wrote in between and the message mentions nobody.

What does not wake her

MessageAnswered
A plain message in an ordinary channelno
A message from another botno
An @everyone or @here announcement that does not also name herno
An @everyone message that does mention heryes
Her name typed as a plain word, with no mentionno — in writing. In a voice channel the spoken name is exactly what wakes her
An empty message in an ordinary channelno
One with only an attachment, in an ordinary channelno — unless it is the same person inside the follow-up window
An attachment with no words, in a home channel or with a mentionyes
A follow-up after somebody else spoke in betweenno
A follow-up that mentions somebodyno
A follow-up more than 90 seconds laterno

The attention window is measured from her last answer to that person in that channel. It exists because four people talking in one room turned every line one of them wrote into something addressed to her.

If you gave her a role that other members also carry, mentioning that role wakes her. Give her an integration role of her own if that is not what you want.

In a DM

She answers everything. If KOTOBA_DISCORD_GUILDS is set, she answers a DM only from somebody who is in one of those servers; with the list empty she answers a DM from anybody who can reach her.

What her reply looks like

  • She shows the typing indicator while she works, and posts the whole answer when the turn ends. It does not stream in word by word.
  • The first message is a reply to the message that called her, without pinging you again.
  • Over 2000 characters her answer is split, preferring a paragraph break, then a sentence end, then a line break. A code fence is closed at the cut and reopened with its language on the next message, so an unbalanced fence never swallows what follows.
  • At most five messages in a row. Past that the last one is truncated and marked (cut here — too long for Discord).
  • Links are tidied: a citation wrapped in double parentheses becomes one plain link, tracking parameters (utm_*, ref, source) are stripped, and the same bare link is not repeated on its own line twice. Text inside code fences and backticks is left exactly as written.
  • The bracketed audio tags she uses to colour her voice do not appear in her writing. A markdown link and a bracket in code do: the rule is contextual, not a blanket strip.
  • She never rings a whole server. @everyone and @here are disabled at the client, so no sentence anybody talks her into can ping everybody. People and roles still resolve, which is what a reply needs.

Attachments

Images and PDFs on a message she answers go to the same vision path the web app uses.

  • Up to 8 MB each, and up to 4 attachments per message.
  • Anything over the size, anything she fails to download, and anything past the fourth is named back to you in her answer — she is told to say plainly which files did not reach her.
  • Any other file type is not looked at. She is not shown its contents and, unless the message says so, she has nothing to tell you about it.