Skip to content

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

The fastest way to build a bot is with the official TypeScript/JavaScript SDK:

bash
npm install @fluffwire/bot-sdk
typescript
import { 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:

  1. 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.

  2. Add the bot to a server — As a server admin, go to Server Settings → Bots → Add Bot, and select your bot.

  3. Authenticate — All API requests use your bot token in the Authorization header:

    Authorization: Bot YOUR_TOKEN_HERE
  4. Connect to the gateway — Open a WebSocket connection to wss://app.fluffwire.com/ws and follow the WebSocket handshake.

  5. 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/api

Rate Limits

Message sending is rate-limited to 5 messages per 5 seconds per bot. Typing indicators are rate-limited to 15 per 5 seconds.

Next Steps

Licensed under CC BY-NC-SA 4.0.