String-based command framework for Stoat
$build[ the bot framework that reads like the messages it sends ]
stoatly.js turns Stoat bot commands into short, readable $function strings.
Instant setup in three commands.
Every command is a name and a code string. Hit "Try it live" to load any of them into the console above.
Install
One package. stoat.js comes along as a dependency, pinned to a known-good version.
^7.3.6. You don't need to install it yourself, though client.client gives you the raw instance if you ever need it directly.- Node.js v22.15.0+ - required by stoat.js itself. Deno v2.2+ also works.
- ES modules only - stoatly.js ships as
"type": "module". Useimport, notrequire(). - CommonJS project? Switch your own
package.jsonto"type": "module", or load stoatly.js with a dynamicimport("stoatly.js").
Every built-in function
Grouped the way you'll reach for them: reading context, taking action, branching logic, storing state, and general-purpose utilities. Search or filter by category.
Bring your own functions
Anything the built-ins don't cover, you add yourself, same $name[args] syntax, your own logic.
Need control over when your arguments get evaluated, the way $if only evaluates the branch it takes? Set lazy: true and read the raw argument nodes yourself:
Nothing is hidden from you
stoatly.js wraps stoat.js, it doesn't replace it. Drop down to raw events whenever a $function isn't enough.
client.client is the underlying stoat.js Client instance. Its users, channels, and messages are reactive under the hood, read straight from it and it stays in sync.
Bring your Bot Online
Get your bot token, start building your bot.
Development
See CONTRIBUTING.md in the repo for how to add a new $function.