Coming soon
A bot platform that is pleasant to write for.
The SDKs are not released yet. This is a preview of what the code will look like, so you can tell whether it is for you. Names and details may still change.
The same bot in two languages
A command that posts a plan, with a button people can press.
import { bot } from "@yappio/bot";
const app = bot({ name: "kettle" });
app.command("plan", async (ctx) => {
await ctx.reply({
text: "Friday at seven.",
buttons: [{ id: "going", label: "I am going" }],
});
});
app.button("going", (ctx) =>
ctx.reply(`${ctx.user.name} is going`));
app.start();from yappio_bot import Bot, Button
bot = Bot(name="kettle")
@bot.command("plan")
async def plan(ctx):
await ctx.reply(
"Friday at seven.",
buttons=[Button("going", "I am going")],
)
@bot.button("going")
async def going(ctx):
await ctx.reply(f"{ctx.user.name} is going")
bot.start()Sketch of the planned API, not a released package. More in the bot framework overview and the preview guides.
What is planned
Slash commands
Register a command with a name and a description. People find it by typing a slash in any message box.
Buttons
Attach buttons to a reply and handle the press in the same program that sent them.
Forms
Collect several answers in one small form instead of a chain of questions in the channel.
Local simulator
Run your bot against a simulated server on your own computer, with no account and no network.
Python SDK
Installed as yappio-bot. Async functions, type hints throughout.
TypeScript SDK
Installed as @yappio/bot. Typed handlers, runs on Node.
Hear when the SDKs are ready
Join the waitlist and you will get a note when bots can be built. The same list covers the app itself.