API reference
Servers
Read servers, roles and members.
Servers are called guilds in the API, as on Discord. A bot can only read servers its app is installed in.
#Get server
GET
/v1/guilds/{guild_id}Returns the server snapshot, with this install's effective scopes and intents.
#Get server channels
GET
/v1/guilds/{guild_id}/channelsThe channels the bot can see.
#Get server roles
GET
/v1/guilds/{guild_id}/rolesThe server's roles, highest first.
#List server members
GET
/v1/guilds/{guild_id}/membersNeeds the members.read scope, which follows the privileged guild_members intent. Members come in user id order.
| Query | Type | Notes |
|---|---|---|
limit | integer | 1 to 1,000 |
after | user id | Start after this user, to page through |
#Get server member
GET
/v1/guilds/{guild_id}/members/{user_id}One member. Needs members.read.
#Server snapshot
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string | |
description | string or null | |
icon_id | string or null | |
owner_id | string | |
channels | array | Channels the bot can see |
categories | array | Only categories holding a channel the bot can see |
roles | array | Roles |
me | object | { roles, permissions }: the bot's own roles and server permissions |
#Role object
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string | |
color | string or null | |
position | integer | Higher is more important |
permissions | array of strings | Permission names, such as send_messages |
hoist | boolean | Shown separately in the member list |
mentionable | boolean | |
managed | boolean | true for an app's role, which only installs can change |
default | boolean | true for @everyone |
#Member object
| Field | Type | Notes |
|---|---|---|
user | object | The user object |
nickname | string or null | |
joined_at | integer | Unix milliseconds |
roles | array of ids |
A member never includes presence, profile details or which other servers the person is in.