Pre-release
The Yappio bot framework for Python and TypeScript
Bots are how a community makes its server its own. Yappio plans a bot platform with SDKs for Python and TypeScript, so you can write a bot in the language you already use and test it on your own computer before it touches a real server. This is preview documentation: the SDKs are not released.
Yappio is in development and has not been released. Everything here describes what is planned. Last updated .
What the platform is planned to offer
A small, consistent surface that covers what most community bots need.
- Slash commands with names, descriptions and typed options.
- Buttons attached to replies, handled in the same program.
- Forms that collect several answers in one step.
- A local simulator that runs a fake server on your machine.
- Two official SDKs: yappio-bot for Python and @yappio/bot for TypeScript.
The shape of the code
A bot is a program that connects, registers commands and handles events. In TypeScript you create an app with bot({ name }) and register handlers with app.command and app.button. In Python you create a Bot and decorate async functions with bot.command and bot.button. Both reply through a context object that knows the user, the channel and the message.
The examples on the developers page show the same bot in both languages. They are sketches of the planned interface; names and details may change before release.
Why a simulator comes first
The slowest part of writing a bot is usually the setup: creating an account, an application, a test server, invitations and tokens. A simulator removes that step. You run your bot against a local stand-in that accepts commands, shows replies and lets you press buttons, with no network and no account.
Design principles
Handlers should be small and readable. Permissions should be explicit. Everything that can be tested without a server should be. The SDKs are meant to feel like ordinary libraries rather than frameworks that take over your project.
Who the platform is for
The platform is aimed at people who want to give a community a small tool: a poll, a reminder, a game, a moderation helper, a link to something outside the app. It should be possible to write a useful bot in an afternoon in a language you already know, without learning a large framework first.
We expect most bots to be small. That is why the design starts with commands, buttons and forms rather than with a large event system, and why the simulator is planned as the first thing you can use.
What is not decided
Several things are open. How bots are published and discovered, what review they go through, how permissions are granted and how limits are set are all undecided. We would rather settle them with developer feedback than guess.
Everything on the developer pages is preview documentation. The code samples are sketches of an interface, and nothing can be installed or run today. If you build bots and have views on the shape of an API, write to [email protected].
How to start when the SDKs exist
The plan is to make the first run short: install the package, create a file with a command, run the simulator and see the reply. After that you add buttons and forms, then connect to a real server with a token. Because none of this is available yet, the best preparation is to think about what you want your bot to do, write that in two sentences, and see whether it fits a command and a reply. If it does, it will be easy to build.
Status and how to follow along
Nothing here is published yet: there are no packages on a registry and no hosted API. Join the waitlist to hear when the SDKs are ready; developers and server owners share the same list.
Questions
Are the SDKs released?
No. The package names yappio-bot and @yappio/bot are planned and not yet published.
Which languages will be supported?
Python and TypeScript are the first two. Others have not been planned.
Will there be a hosted bot platform?
Hosting for bots has not been decided.
Related
Get a note when Yappio opens
Yappio is still being built. Leave your address and you will hear from us once there is something you can use.