freeq includes a Rust bot framework for building IRC bots with AT Protocol identity.
See the Bot Quickstart for a complete 10-minute tutorial.
Bot::new("!", "mybot")
→ command routing (prefix matching)
→ permission checks (Anyone / Authenticated / Admin)
→ rate limiting (per-user token bucket)
→ input size validation
→ handler receives CommandContext
Anyone, Authenticated (requires DID), Admin (specific DIDs)run_with_reconnect() with exponential backoff and auto-rejoin// Anyone can use
bot.command("ping", "Pong!", handler);
// Must be authenticated with a DID
bot.auth_command("whoami", "Show your DID", handler);
// Only admin DIDs
let bot = Bot::new("!", "mybot").admin("did:plc:abc123");
bot.admin_command("kick", "Kick a user", handler);
Every handler receives a CommandContext with:
ctx.reply("text") — Send to channel or PMctx.reply_to("text") — Reply with nick: textctx.reply_in_thread("text") — Threaded replyctx.react("🔥") — React to the triggering messagectx.typing() / ctx.typing_done() — Typing indicatorctx.sender, ctx.sender_did, ctx.args, ctx.msgid()Three examples in freeq-sdk/examples/:
echo_bot.rs — Minimal (10 lines of logic)framework_bot.rs — Commands + permissionsmoderation_bot.rs — Full-featured: threads, reactions, rate limiting, admin commands, auto-reconnect