Complete programs from the repository's examples/ folder. Run one with:
STRAFE_INSTANCE=app.strafe.chat STRAFE_TOKEN=your-token node examples/ping-pong.tsOn Node.js older than 22.18, use npx tsx.
The smallest bot. Walk-through in Your first bot.
<<< @/../examples/ping-pong.ts
An embed, a generated file, and an uploaded image inside an embed via attachment://.
<<< @/../examples/embeds.ts
Kick, ban, unban and purge, with permission checks.
<<< @/../examples/moderation.ts
React to get a role, unreact to lose it.
<<< @/../examples/reaction-roles.ts
"Log in with Strafe" for a website, with PKCE, on node:http.
<<< @/../examples/oauth2-login.ts
Post from a script without the gateway.
<<< @/../examples/rest-only.ts