Overview
Voicaw's bot API is Discord's API, version 10: the same REST endpoints, the same gateway and the same objects. Libraries written for Discord, like discord.js and discord.py, work with Voicaw once you point them at Voicaw's addresses. If you've written a Discord bot before, you already know most of this.
Addresses
| What | Address |
|---|---|
| REST API | https://api.voicaw.com/api/v10 |
| Gateway | wss://api.voicaw.com/api/gateway (as GET /gateway/bot says) |
| Pictures (Discord's CDN paths) | https://api.voicaw.com/api/cdn |
| Developer Portal | app.voicaw.com/developers |
| Adding a bot to a guild | https://app.voicaw.com/oauth2/authorize?client_id=…&scope=bot&permissions=… |
/api/v9 works too, and is the same as /api/v10.
Bots live in guilds
On Voicaw, direct messages and group chats between people are end-to-end encrypted: the server can't read them, so a bot can't either. Bots live in guilds, which aren't encrypted, and can't be added to a group chat or called.
A bot can have its own DMs with people, which are not
end-to-end encrypted (the app says so on the conversation). POST
/users/@me/channels with a recipient_id opens one (a type 1 channel)
with someone the bot shares a guild with, unless they've blocked it or turned off "Let
bots message me"; otherwise it, and every message after, fails with 50007.
In a DM a bot can send, edit and delete its own messages (content, embeds and files; no
components yet), read the history, and hear the person's messages with the Direct
Messages intent. People can start one from the bot's profile, and delete the whole
conversation (it's gone for the bot too). Reactions, pins, replies, threads and commands
don't work in DMs yet.
A bot only sees the people it shares a guild with. Fetching any other user fails with
10013 Unknown User.
No privileged intents
Intents still choose which gateway events your bot gets, but none of them needs approval: Guild Members, Guild Presences and Message Content are there for any bot that asks. A message's content is always included, in the gateway and over REST, whether or not you ask for the Message Content intent.
Commands and components
Slash commands, right-click (user and message) commands, buttons, select menus, forms, autocomplete and ephemeral replies work as on Discord. Interactions come over the gateway only. See Commands and components.
Simpler permissions
Adding a bot has one scope, bot (logging people in to your website is
identify, see Login with Voicaw). Someone with Manage Guild
adds your bot from its invite link. The bot then gets a role of its own holding the
permissions they ticked, which can only be ones they have themselves. After that, its
permissions work as anyone's: its roles, then channel overrides. See
Permissions.
Where next
- Getting started: make an application and add its bot to a guild.
- discord.js, discord.py and HTTP: the settings each library needs.
- Commands and components: slash commands, buttons, selects and forms.
- Differences from Discord: what isn't there yet.