Building a bot
Everything in this section is code you write against one neutral API. None of it is platform-specific: the same handlers run on Slack, Google Chat and Microsoft Teams, and Capabilities is how they cope with the differences.
The usual order of reading:
- Sending messages — composing a reply with the fluent builder.
- Handling events — the five things a bot can be told about.
- Capabilities — checking a feature exists before using it.
- Mentions and direct messages — reaching a particular person.
- AI and tools — letting a model answer, and call your code.
- The knowledge base — where the answers come from.
- The knowledge-base website — the same answers, published for people.
- Recording what people ask — the questions, counted, where you can read them.
A bot is a defineBot({ … }) object of optional handlers and a
createBotRuntime({ bot, platforms }) default export. There is nothing else to
wire.