examples
runnable, single-file bots in the monorepo under examples/. each is a
workspace package wired to the local source, so it's also a live smoke test of the public API.
clone, drop a token in .env, and run.
# from a clone of the monorepo
pnpm install
# copy the env template, then add your token(s)
cp examples/panel/.env.example examples/panel/.env
# run with reload (reads .env)
pnpm --filter @yaebal/example-panel devwant a standalone project instead of the monorepo? scaffold one with create-yaebal — pnpm create yaebal my-bot.
basic — a plugin tour
a single bot wiring most of the first-party plugins. each command demonstrates one of them. source: examples/basic.
| command | what it shows |
|---|---|
/start | a formatted greeting with an inline keyboard (keyboard + callback-data) |
/count | a per-chat counter (session) |
/menu | a two-window dialog with stack navigation (morda) |
/photo | sends a photo by url (media) |
/lang | toggles the locale and replies in it (i18n) |
/register | a name → age wizard (scenes) |
/name | asks once and handles the reply (prompt) |
run it: pnpm --filter @yaebal/example-basic dev (needs BOT_TOKEN).
panel — operator dashboard
the panel end-to-end: a live operator dashboard with media in both directions, served on a native node server. it exercises the recorder, outgoing-reply logging, the login page, realtime SSE and the media proxy. source: examples/panel.
| try | what happens |
|---|---|
| send text | appears live in the panel; the bot echoes it back |
| send a photo / document / voice | rendered inline — image, download link, or audio player |
| send an album | grouped into one media bubble |
| reply from the panel | delivered via sendMessage; 📎 uploads send as sendPhoto / sendDocument / … |
run it: pnpm --filter @yaebal/example-panel dev (needs BOT_TOKEN + PANEL_TOKEN), then open http://localhost:3000 and paste the panel token.
private workspace packages — they're not published to npm. they exist to
run locally and to keep the public API honest as the framework evolves.