What Are Bots?
Automated users that interact with spaces, channels, and members via the Argon Bot API.
Overview #
Bots are special Argon accounts controlled by code instead of a human. They can send messages, moderate channels, stream audio, respond to slash commands, and react to real-time events — all through a simple REST + SSE API.
Every bot has a linked user account (with a bot username suffix)
and appears in member lists like any other user. Under the hood, bot requests are authenticated with a secret token
and processed through the same permission system as regular users.
Architecture #
REST API — Send messages, manage channels, query members, register commands. All endpoints require Authorization: Bot <token>.
SSE Stream — Open a single persistent connection to receive events in real time. Filter events by intent bitmask. Automatically replay missed events on reconnection.
Voice WebSocket — Stream Opus audio directly to voice channels via a WebSocket ingress endpoint. No WebRTC needed.
Bot vs. User #
_bot Free choice User Flags #
Every user object in the Bot API includes a flags bitmask field.
Use bitwise AND to check for specific flags.
About System Account
The SYSTEM user always has a fixed ID: 11111111-2222-1111-2222-111111111111.
// Example: check if a user is a verified bot const isBot = (user.flags & 1) !== 0; const isVerified = (user.flags & 4) !== 0; if (isBot && isVerified) { // Verified bot }
Slash Commands #
Bots can register slash commands that users invoke via the / prefix in any text channel.
Commands are registered through the ICommands/v1 interface and interactions are delivered as CommandInteraction SSE events.
toLowerInvariant() spaceId) or global (omit it) Option Types
Each command can accept typed options:
POST /ICommands/v1/Register { "spaceId": "...", "name": "play", "description": "Play a song by URL or search query", "options": [ { "name": "query", "description": "Song URL or search term", "type": "String", "required": true } ] }
Bot Lifecycle #
- 1
Create
Register a bot application at console.argon.gl. Get your bot token.
- 2
Install
Add the bot to a space. The bot appears as a member and receives a
botInstallingToSpaceevent. When removed, it receivesbotUninstallingFromSpace. These lifecycle events are always delivered regardless of intents. - 3
Connect
Open an SSE stream with your desired intents. Receive a
Readyevent with your active spaces. - 4
React
Handle incoming events (messages, commands, member changes) and respond via REST API calls.
- 5
Scale
Apply for verification to unlock privileged intents, higher rate limits, and advanced APIs like voice egress and calls.
Verified Bots #
Verified bots have been reviewed by the Argon team and gain access to:
- Privileged intents — Members, Presence, and other sensitive event categories
- Higher rate limits — Increased token buckets for all interfaces
- Voice egress — Listen to individual audio tracks from voice channels
- Calls API — Accept incoming calls from users
- Verified badge — Displayed next to the bot name in member lists
Apply for verification through the Developer Console.