Bot Developer Reference
Fluffwire supports bots — automated accounts that can send messages, respond to slash commands, and integrate with your servers.
Overview
A bot is a special user account controlled by a token. Bots can:
- Send and delete messages in channels they have access to
- Register and respond to slash commands invoked by users
- Add emoji reactions to messages
- Upload files and attachments
- Connect to the WebSocket gateway to receive real-time events
Recommended: Use the SDK
The fastest way to build a bot is with the official TypeScript/JavaScript SDK:
npm install @fluffwire/bot-sdkimport { FluffwireClient } from '@fluffwire/bot-sdk'
const client = new FluffwireClient({ token: process.env.BOT_TOKEN! })
client.on('messageCreate', async (msg) => {
if (msg.author.isBot) return
if (msg.content === '!ping') {
await client.sendMessage(msg.channelId, 'Pong! 🏓')
}
})
await client.connect()See the SDK reference → for full documentation, all events and methods, and runnable examples.
Quick Start (raw API)
If you prefer to use the HTTP and WebSocket APIs directly:
Create a bot — Go to app.fluffwire.com → Settings → Developer → New Bot. Give it a name, then copy the token shown. You will not be able to see it again.
Add the bot to a server — As a server admin, go to Server Settings → Bots → Add Bot, and select your bot.
Authenticate — All API requests use your bot token in the
Authorizationheader:Authorization: Bot YOUR_TOKEN_HEREConnect to the gateway — Open a WebSocket connection to
wss://app.fluffwire.com/wsand follow the WebSocket handshake.Register commands — Use the bot self-service API to register slash commands that users can invoke in channels.
Base URL
All REST API requests are made to:
https://app.fluffwire.com/apiRate Limits
Message sending is rate-limited to 5 messages per 5 seconds per bot. Typing indicators are rate-limited to 15 per 5 seconds.