New to Corsair? See API access, authentication, and error handling.
Channels
delete
channels.delete
Delete a server channel and its messages, leave a group, or close a direct message (its messages stay)
Risk: destructive · Irreversible
await corsair.revolt.api.channels.delete({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
edit
channels.edit
Rename or redescribe a group or server channel
Risk: write
await corsair.revolt.api.channels.edit({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1', name: 'announcements' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
name | string | No | — |
description | string | No | — |
icon | string | No | An attachment id returned by the Autumn upload service. |
| Name | Type | Required | Description |
|---|---|---|---|
channel | object | Yes | — |
channel full type
channel full type
{
_id?: string | null,
channel_type?: string | null,
name?: string | null,
description?: string | null,
server?: string | null,
owner?: string | null,
recipients?: string[] | null,
active?: boolean | null,
last_message_id?: string | null,
permissions?: number | null,
default_permissions?: number | {
a?: number | null,
d?: number | null
} | null,
role_permissions?: Record<string, {
a?: number | null,
d?: number | null
}> | null,
nsfw?: boolean | null,
icon?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
}
get
channels.get
Fetch one channel with its type, name and permissions
Risk: read
await corsair.revolt.api.channels.get({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | A channel id. |
| Name | Type | Required | Description |
|---|---|---|---|
channel | object | Yes | — |
channel full type
channel full type
{
_id?: string | null,
channel_type?: string | null,
name?: string | null,
description?: string | null,
server?: string | null,
owner?: string | null,
recipients?: string[] | null,
active?: boolean | null,
last_message_id?: string | null,
permissions?: number | null,
default_permissions?: number | {
a?: number | null,
d?: number | null
} | null,
role_permissions?: Record<string, {
a?: number | null,
d?: number | null
}> | null,
nsfw?: boolean | null,
icon?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
}
Messages
delete
messages.delete
Delete a message permanently
Risk: destructive · Irreversible
await corsair.revolt.api.messages.delete({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1', message_id: '01F8Z2B3C4D5E6F7G8H9J0K1L2' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | A message id, such as 01F8Z0T8Y4W4Z8X3K5M2N1P0Q9. |
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
edit
messages.edit
Edit a message the account posted, replacing its content
Risk: write
await corsair.revolt.api.messages.edit({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1', message_id: '01F8Z2B3C4D5E6F7G8H9J0K1L2', content: 'Standup in ten' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | A message id, such as 01F8Z0T8Y4W4Z8X3K5M2N1P0Q9. |
content | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | object | Yes | — |
message full type
message full type
{
_id?: string | null,
channel?: string | null,
author?: string | null,
content?: string | null,
nonce?: string | null,
edited?: string | null,
pinned?: boolean | null,
flags?: number | null,
attachments?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null,
content_type?: string | null,
size?: number | null
}[] | null,
mentions?: string[] | null,
role_mentions?: string[] | null,
replies?: string[] | null,
reactions?: Record<string, string[]> | null,
embeds?: {
type?: string | null,
url?: string | null,
original_url?: string | null,
special?: Record<string, string> | null,
title?: string | null,
description?: string | null,
site_name?: string | null,
icon_url?: string | null,
colour?: string | null,
image?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
video?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
}[] | null,
user?: {
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
} | null,
member?: {
_id?: {
server?: string | null,
user?: string | null
} | null,
nickname?: string | null,
joined_at?: string | null,
roles?: string[] | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
timeout?: string | null
} | null
}
get
messages.get
Fetch one message by id
Risk: read
await corsair.revolt.api.messages.get({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1', message_id: '01F8Z2B3C4D5E6F7G8H9J0K1L2' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | A message id, such as 01F8Z0T8Y4W4Z8X3K5M2N1P0Q9. |
| Name | Type | Required | Description |
|---|---|---|---|
message | object | Yes | — |
message full type
message full type
{
_id?: string | null,
channel?: string | null,
author?: string | null,
content?: string | null,
nonce?: string | null,
edited?: string | null,
pinned?: boolean | null,
flags?: number | null,
attachments?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null,
content_type?: string | null,
size?: number | null
}[] | null,
mentions?: string[] | null,
role_mentions?: string[] | null,
replies?: string[] | null,
reactions?: Record<string, string[]> | null,
embeds?: {
type?: string | null,
url?: string | null,
original_url?: string | null,
special?: Record<string, string> | null,
title?: string | null,
description?: string | null,
site_name?: string | null,
icon_url?: string | null,
colour?: string | null,
image?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
video?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
}[] | null,
user?: {
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
} | null,
member?: {
_id?: {
server?: string | null,
user?: string | null
} | null,
nickname?: string | null,
joined_at?: string | null,
roles?: string[] | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
timeout?: string | null
} | null
}
list
messages.list
Read a channel’s messages with time cursors, already carrying their authors
Risk: read
await corsair.revolt.api.messages.list({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1', limit: 50 });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
limit | number | No | Messages to return, up to 100. |
before | string | No | A message id, such as 01F8Z0T8Y4W4Z8X3K5M2N1P0Q9. |
after | string | No | A message id, such as 01F8Z0T8Y4W4Z8X3K5M2N1P0Q9. |
nearby | string | No | A message id, such as 01F8Z0T8Y4W4Z8X3K5M2N1P0Q9. |
sort | Oldest | Latest | Relevance | No | Message order, Latest by default. Stoat ignores it when nearby is set. |
include_users | boolean | No | Return the authors as users and members beside the messages. Defaults to true. |
users and members beside the messages, so authors resolve without a second call.
Output
| Name | Type | Required | Description |
|---|---|---|---|
messages | object[] | Yes | — |
users | object[] | null | No | — |
members | object[] | null | No | — |
messages full type
messages full type
{
_id?: string | null,
channel?: string | null,
author?: string | null,
content?: string | null,
nonce?: string | null,
edited?: string | null,
pinned?: boolean | null,
flags?: number | null,
attachments?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null,
content_type?: string | null,
size?: number | null
}[] | null,
mentions?: string[] | null,
role_mentions?: string[] | null,
replies?: string[] | null,
reactions?: Record<string, string[]> | null,
embeds?: {
type?: string | null,
url?: string | null,
original_url?: string | null,
special?: Record<string, string> | null,
title?: string | null,
description?: string | null,
site_name?: string | null,
icon_url?: string | null,
colour?: string | null,
image?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
video?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
}[] | null,
user?: {
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
} | null,
member?: {
_id?: {
server?: string | null,
user?: string | null
} | null,
nickname?: string | null,
joined_at?: string | null,
roles?: string[] | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
timeout?: string | null
} | null
}[]
users full type
users full type
{
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
}[] | null
members full type
members full type
{
_id?: {
server?: string | null,
user?: string | null
} | null,
nickname?: string | null,
joined_at?: string | null,
roles?: string[] | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
timeout?: string | null
}[] | null
send
messages.send
Send a message to a channel, optionally replying or attaching files
Risk: write
await corsair.revolt.api.messages.send({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1', content: 'Standup in five' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
content | string | No | — |
nonce | string | No | A client id that makes a retry idempotent. |
replies | object[] | No | — |
attachments | string[] | No | Ids returned from the autumn upload service. |
content or an attachment id; nonce makes a retry idempotent.
replies full type
replies full type
{
id: string,
mention: boolean
}[]
| Name | Type | Required | Description |
|---|---|---|---|
message | object | Yes | — |
message full type
message full type
{
_id?: string | null,
channel?: string | null,
author?: string | null,
content?: string | null,
nonce?: string | null,
edited?: string | null,
pinned?: boolean | null,
flags?: number | null,
attachments?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null,
content_type?: string | null,
size?: number | null
}[] | null,
mentions?: string[] | null,
role_mentions?: string[] | null,
replies?: string[] | null,
reactions?: Record<string, string[]> | null,
embeds?: {
type?: string | null,
url?: string | null,
original_url?: string | null,
special?: Record<string, string> | null,
title?: string | null,
description?: string | null,
site_name?: string | null,
icon_url?: string | null,
colour?: string | null,
image?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
video?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
}[] | null,
user?: {
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
} | null,
member?: {
_id?: {
server?: string | null,
user?: string | null
} | null,
nickname?: string | null,
joined_at?: string | null,
roles?: string[] | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
timeout?: string | null
} | null
}
Reactions
add
reactions.add
Add an emoji reaction to a message
Risk: write
await corsair.revolt.api.reactions.add({ channel_id: '01F8Z1A2B3C4D5E6F7G8H9J0K1', message_id: '01F8Z2B3C4D5E6F7G8H9J0K1L2', emoji: '👍' });
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | A message id, such as 01F8Z0T8Y4W4Z8X3K5M2N1P0Q9. |
emoji | string | Yes | A unicode emoji, or a custom emoji id as it is, without colons. |
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | — |
Servers
get
servers.get
Fetch one server with its channels, roles and default permissions
Risk: read
await corsair.revolt.api.servers.get({ server_id: '01F8Z3C4D5E6F7G8H9J0K1L2M3', include_channels: true });
| Name | Type | Required | Description |
|---|---|---|---|
server_id | string | Yes | — |
include_channels | boolean | No | Return channels as channel objects instead of ids. |
| Name | Type | Required | Description |
|---|---|---|---|
server | object | Yes | — |
server full type
server full type
{
_id?: string | null,
name?: string | null,
owner?: string | null,
description?: string | null,
channels?: (string | {
_id?: string | null,
channel_type?: string | null,
name?: string | null,
description?: string | null,
server?: string | null,
owner?: string | null,
recipients?: string[] | null,
active?: boolean | null,
last_message_id?: string | null,
permissions?: number | null,
default_permissions?: number | {
a?: number | null,
d?: number | null
} | null,
role_permissions?: Record<string, {
a?: number | null,
d?: number | null
}> | null,
nsfw?: boolean | null,
icon?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
})[] | null,
categories?: {
id?: string | null,
title?: string | null,
channels?: string[] | null
}[] | null,
roles?: Record<string, {
_id?: string | null,
name?: string | null,
permissions?: {
a?: number | null,
d?: number | null
} | null,
colour?: string | null,
hoist?: boolean | null,
rank?: number | null
}> | null,
default_permissions?: number | null,
approximate_member_count?: number | null,
nsfw?: boolean | null,
icon?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
banner?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
flags?: number | null,
analytics?: boolean | null,
discoverable?: boolean | null
}
members
servers.members
List a server’s members with their users, optionally excluding offline ones
Risk: read
await corsair.revolt.api.servers.members({ server_id: '01F8Z3C4D5E6F7G8H9J0K1L2M3', exclude_offline: true });
| Name | Type | Required | Description |
|---|---|---|---|
server_id | string | Yes | — |
exclude_offline | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
members | object[] | Yes | — |
users | object[] | Yes | — |
members full type
members full type
{
_id?: {
server?: string | null,
user?: string | null
} | null,
nickname?: string | null,
joined_at?: string | null,
roles?: string[] | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
timeout?: string | null
}[]
users full type
users full type
{
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
}[]
Users
dms
users.dms
List the direct-message and group channels the account is in, with their recipient ids
Risk: read
await corsair.revolt.api.users.dms({});
| Name | Type | Required | Description |
|---|---|---|---|
channels | object[] | Yes | — |
channels full type
channels full type
{
_id?: string | null,
channel_type?: string | null,
name?: string | null,
description?: string | null,
server?: string | null,
owner?: string | null,
recipients?: string[] | null,
active?: boolean | null,
last_message_id?: string | null,
permissions?: number | null,
default_permissions?: number | {
a?: number | null,
d?: number | null
} | null,
role_permissions?: Record<string, {
a?: number | null,
d?: number | null
}> | null,
nsfw?: boolean | null,
icon?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null
}[]
get
users.get
Fetch one user by id with their profile and presence
Risk: read
await corsair.revolt.api.users.get({ user_id: '01F8Z0T8Y4W4Z8X3K5M2N1P0Q9' });
| Name | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | A user id, or @me for yourself. |
| Name | Type | Required | Description |
|---|---|---|---|
user | object | Yes | — |
user full type
user full type
{
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
}
me
users.me
Read the account behind the token: its id, username, discriminator and status
Risk: read
await corsair.revolt.api.users.me({});
credential: user for a session token.
Output
| Name | Type | Required | Description |
|---|---|---|---|
user | object | Yes | — |
user full type
user full type
{
_id?: string | null,
username?: string | null,
discriminator?: string | null,
display_name?: string | null,
pronouns?: string | null,
online?: boolean | null,
badges?: number | null,
flags?: number | null,
privileged?: boolean | null,
avatar?: {
_id?: string | null,
tag?: string | null,
filename?: string | null,
content_type?: string | null,
size?: number | null,
deleted?: boolean | null,
reported?: boolean | null,
message_id?: string | null,
user_id?: string | null,
server_id?: string | null,
object_id?: string | null,
metadata?: {
type?: string | null,
size?: number | null,
width?: number | null,
height?: number | null
} | null
} | null,
bot?: {
_id?: string | null,
owner?: string | null,
public?: boolean | null,
analytics?: boolean | null,
discoverable?: boolean | null,
interactions_url?: string | null,
terms_of_service_url?: string | null,
privacy_policy_url?: string | null,
flags?: number | null
} | null,
relationship?: string | null,
status?: {
text?: string | null,
presence?: string | null
} | null
}