discord.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
Channels
list
channels.list
List channels in a guild
Risk: read
await corsair.discord.api.channels.list({});
| Name | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | — |
object[]
Output full type
Output full type
{
id: string,
type: number,
guild_id?: string,
name?: string | null,
topic?: string | null,
position?: number,
parent_id?: string | null,
last_message_id?: string | null,
owner_id?: string,
thread_metadata?: {
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}
}[]
Guilds
get
guilds.get
Get info about a guild
Risk: read
await corsair.discord.api.guilds.get({});
| Name | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | — |
with_counts | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | Yes | — |
icon | string | No | — |
splash | string | No | — |
owner_id | string | Yes | — |
afk_timeout | number | Yes | — |
verification_level | number | Yes | — |
default_message_notifications | number | Yes | — |
explicit_content_filter | number | Yes | — |
roles | object[] | Yes | — |
features | string[] | Yes | — |
mfa_level | number | Yes | — |
description | string | No | — |
premium_tier | number | Yes | — |
premium_subscription_count | number | No | — |
preferred_locale | string | Yes | — |
approximate_member_count | number | No | — |
approximate_presence_count | number | No | — |
roles full type
roles full type
{
id: string,
name: string,
permissions: string,
position: number,
color: number,
hoist: boolean,
managed: boolean,
mentionable: boolean
}[]
list
guilds.list
List guilds the bot is a member of
Risk: read
await corsair.discord.api.guilds.list({});
| Name | Type | Required | Description |
|---|---|---|---|
before | string | No | — |
after | string | No | — |
limit | number | No | — |
with_counts | boolean | No | — |
object[]
Output full type
Output full type
{
id: string,
name: string,
icon?: string | null,
owner: boolean,
permissions: string,
features: string[],
approximate_member_count?: number,
approximate_presence_count?: number
}[]
Members
get
members.get
Get info about a guild member
Risk: read
await corsair.discord.api.members.get({});
| Name | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | — |
user_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
user | object | No | — |
nick | string | No | — |
avatar | string | No | — |
roles | string[] | Yes | — |
joined_at | string | Yes | — |
premium_since | string | No | — |
deaf | boolean | Yes | — |
mute | boolean | Yes | — |
flags | number | Yes | — |
pending | boolean | No | — |
user full type
user full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}
list
members.list
List members of a guild
Risk: read
await corsair.discord.api.members.list({});
| Name | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | — |
limit | number | No | — |
after | string | No | — |
object[]
Output full type
Output full type
{
user?: {
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
},
nick?: string | null,
avatar?: string | null,
roles: string[],
joined_at: string,
premium_since?: string | null,
deaf: boolean,
mute: boolean,
flags: number,
pending?: boolean
}[]
Messages
delete
messages.delete
Permanently delete a message
Risk: destructive · Irreversible
await corsair.discord.api.messages.delete({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
success | true | Yes | — |
edit
messages.edit
Edit an existing message
Risk: write
await corsair.discord.api.messages.edit({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
content | string | No | — |
embeds | object[] | No | — |
components | object[] | No | — |
allowed_mentions | object | No | — |
embeds full type
embeds full type
{
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[]
components full type
components full type
{
type: 1,
components: (
{
type: 2,
style: number,
label?: string,
emoji?: {
id?: string,
name?: string,
animated?: boolean
},
custom_id?: string,
url?: string,
sku_id?: string,
disabled?: boolean
} | {
type: 3,
custom_id: string,
options: {
label: string,
value: string,
description?: string,
emoji?: {
id?: string,
name?: string,
animated?: boolean
},
default?: boolean
}[],
placeholder?: string,
min_values?: number,
max_values?: number,
disabled?: boolean
} | {
type: 5 | 6 | 7 | 8,
custom_id: string,
placeholder?: string,
min_values?: number,
max_values?: number,
channel_types?: number[],
disabled?: boolean
}
)[]
}[]
allowed_mentions full type
allowed_mentions full type
{
parse?: ('roles' | 'users' | 'everyone')[],
roles?: string[],
users?: string[],
replied_user?: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
channel_id | string | Yes | — |
author | object | Yes | — |
content | string | Yes | — |
timestamp | string | Yes | — |
edited_timestamp | string | No | — |
tts | boolean | Yes | — |
mention_everyone | boolean | Yes | — |
mentions | object[] | Yes | — |
mention_roles | string[] | Yes | — |
attachments | object[] | Yes | — |
embeds | object[] | Yes | — |
reactions | object[] | No | — |
pinned | boolean | Yes | — |
type | number | Yes | — |
flags | number | No | — |
components | object[] | No | — |
message_reference | object | No | — |
thread | object | No | — |
nonce | string | number | No | — |
referenced_message | lazy | Yes | — |
author full type
author full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}
mentions full type
mentions full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}[]
attachments full type
attachments full type
{
id: string,
filename: string,
description?: string,
content_type?: string,
size: number,
url: string,
proxy_url: string,
height?: number | null,
width?: number | null
}[]
embeds full type
embeds full type
{
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[]
reactions full type
reactions full type
{
count: number,
me: boolean,
emoji: {
id?: string | null,
name: string
}
}[]
components full type
components full type
{
type: number
}[]
message_reference full type
message_reference full type
{
message_id?: string,
channel_id?: string,
guild_id?: string
}
thread full type
thread full type
{
id: string,
type: number,
guild_id?: string,
name?: string | null,
topic?: string | null,
position?: number,
parent_id?: string | null,
last_message_id?: string | null,
owner_id?: string,
thread_metadata?: {
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}
}
get
messages.get
Get a specific message
Risk: read
await corsair.discord.api.messages.get({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
channel_id | string | Yes | — |
author | object | Yes | — |
content | string | Yes | — |
timestamp | string | Yes | — |
edited_timestamp | string | No | — |
tts | boolean | Yes | — |
mention_everyone | boolean | Yes | — |
mentions | object[] | Yes | — |
mention_roles | string[] | Yes | — |
attachments | object[] | Yes | — |
embeds | object[] | Yes | — |
reactions | object[] | No | — |
pinned | boolean | Yes | — |
type | number | Yes | — |
flags | number | No | — |
components | object[] | No | — |
message_reference | object | No | — |
thread | object | No | — |
nonce | string | number | No | — |
referenced_message | lazy | Yes | — |
author full type
author full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}
mentions full type
mentions full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}[]
attachments full type
attachments full type
{
id: string,
filename: string,
description?: string,
content_type?: string,
size: number,
url: string,
proxy_url: string,
height?: number | null,
width?: number | null
}[]
embeds full type
embeds full type
{
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[]
reactions full type
reactions full type
{
count: number,
me: boolean,
emoji: {
id?: string | null,
name: string
}
}[]
components full type
components full type
{
type: number
}[]
message_reference full type
message_reference full type
{
message_id?: string,
channel_id?: string,
guild_id?: string
}
thread full type
thread full type
{
id: string,
type: number,
guild_id?: string,
name?: string | null,
topic?: string | null,
position?: number,
parent_id?: string | null,
last_message_id?: string | null,
owner_id?: string,
thread_metadata?: {
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}
}
list
messages.list
List recent messages in a channel
Risk: read
await corsair.discord.api.messages.list({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
limit | number | No | — |
before | string | No | — |
after | string | No | — |
around | string | No | — |
object[]
Output full type
Output full type
{
id: string,
channel_id: string,
author: {
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
},
content: string,
timestamp: string,
edited_timestamp?: string | null,
tts: boolean,
mention_everyone: boolean,
mentions: {
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}[],
mention_roles: string[],
attachments: {
id: string,
filename: string,
description?: string,
content_type?: string,
size: number,
url: string,
proxy_url: string,
height?: number | null,
width?: number | null
}[],
embeds: {
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[],
reactions?: {
count: number,
me: boolean,
emoji: {
id?: string | null,
name: string
}
}[],
pinned: boolean,
type: number,
flags?: number,
components?: {
type: number
}[],
message_reference?: {
message_id?: string,
channel_id?: string,
guild_id?: string
},
thread?: {
id: string,
type: number,
guild_id?: string,
name?: string | null,
topic?: string | null,
position?: number,
parent_id?: string | null,
last_message_id?: string | null,
owner_id?: string,
thread_metadata?: {
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}
},
nonce?: string | number,
referenced_message: lazy
}[]
reply
messages.reply
Reply to a message in a channel
Risk: write
await corsair.discord.api.messages.reply({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
content | string | No | — |
embeds | object[] | No | — |
components | object[] | No | — |
allowed_mentions | object | No | — |
fail_if_not_exists | boolean | No | — |
embeds full type
embeds full type
{
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[]
components full type
components full type
{
type: 1,
components: (
{
type: 2,
style: number,
label?: string,
emoji?: {
id?: string,
name?: string,
animated?: boolean
},
custom_id?: string,
url?: string,
sku_id?: string,
disabled?: boolean
} | {
type: 3,
custom_id: string,
options: {
label: string,
value: string,
description?: string,
emoji?: {
id?: string,
name?: string,
animated?: boolean
},
default?: boolean
}[],
placeholder?: string,
min_values?: number,
max_values?: number,
disabled?: boolean
} | {
type: 5 | 6 | 7 | 8,
custom_id: string,
placeholder?: string,
min_values?: number,
max_values?: number,
channel_types?: number[],
disabled?: boolean
}
)[]
}[]
allowed_mentions full type
allowed_mentions full type
{
parse?: ('roles' | 'users' | 'everyone')[],
roles?: string[],
users?: string[],
replied_user?: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
channel_id | string | Yes | — |
author | object | Yes | — |
content | string | Yes | — |
timestamp | string | Yes | — |
edited_timestamp | string | No | — |
tts | boolean | Yes | — |
mention_everyone | boolean | Yes | — |
mentions | object[] | Yes | — |
mention_roles | string[] | Yes | — |
attachments | object[] | Yes | — |
embeds | object[] | Yes | — |
reactions | object[] | No | — |
pinned | boolean | Yes | — |
type | number | Yes | — |
flags | number | No | — |
components | object[] | No | — |
message_reference | object | No | — |
thread | object | No | — |
nonce | string | number | No | — |
referenced_message | lazy | Yes | — |
author full type
author full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}
mentions full type
mentions full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}[]
attachments full type
attachments full type
{
id: string,
filename: string,
description?: string,
content_type?: string,
size: number,
url: string,
proxy_url: string,
height?: number | null,
width?: number | null
}[]
embeds full type
embeds full type
{
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[]
reactions full type
reactions full type
{
count: number,
me: boolean,
emoji: {
id?: string | null,
name: string
}
}[]
components full type
components full type
{
type: number
}[]
message_reference full type
message_reference full type
{
message_id?: string,
channel_id?: string,
guild_id?: string
}
thread full type
thread full type
{
id: string,
type: number,
guild_id?: string,
name?: string | null,
topic?: string | null,
position?: number,
parent_id?: string | null,
last_message_id?: string | null,
owner_id?: string,
thread_metadata?: {
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}
}
send
messages.send
Send a message to a channel
Risk: write
await corsair.discord.api.messages.send({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
content | string | No | — |
embeds | object[] | No | — |
components | object[] | No | — |
allowed_mentions | object | No | — |
tts | boolean | No | — |
nonce | string | number | No | — |
embeds full type
embeds full type
{
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[]
components full type
components full type
{
type: 1,
components: (
{
type: 2,
style: number,
label?: string,
emoji?: {
id?: string,
name?: string,
animated?: boolean
},
custom_id?: string,
url?: string,
sku_id?: string,
disabled?: boolean
} | {
type: 3,
custom_id: string,
options: {
label: string,
value: string,
description?: string,
emoji?: {
id?: string,
name?: string,
animated?: boolean
},
default?: boolean
}[],
placeholder?: string,
min_values?: number,
max_values?: number,
disabled?: boolean
} | {
type: 5 | 6 | 7 | 8,
custom_id: string,
placeholder?: string,
min_values?: number,
max_values?: number,
channel_types?: number[],
disabled?: boolean
}
)[]
}[]
allowed_mentions full type
allowed_mentions full type
{
parse?: ('roles' | 'users' | 'everyone')[],
roles?: string[],
users?: string[],
replied_user?: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
channel_id | string | Yes | — |
author | object | Yes | — |
content | string | Yes | — |
timestamp | string | Yes | — |
edited_timestamp | string | No | — |
tts | boolean | Yes | — |
mention_everyone | boolean | Yes | — |
mentions | object[] | Yes | — |
mention_roles | string[] | Yes | — |
attachments | object[] | Yes | — |
embeds | object[] | Yes | — |
reactions | object[] | No | — |
pinned | boolean | Yes | — |
type | number | Yes | — |
flags | number | No | — |
components | object[] | No | — |
message_reference | object | No | — |
thread | object | No | — |
nonce | string | number | No | — |
referenced_message | lazy | Yes | — |
author full type
author full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}
mentions full type
mentions full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}[]
attachments full type
attachments full type
{
id: string,
filename: string,
description?: string,
content_type?: string,
size: number,
url: string,
proxy_url: string,
height?: number | null,
width?: number | null
}[]
embeds full type
embeds full type
{
title?: string,
description?: string,
url?: string,
color?: number,
fields?: {
name: string,
value: string,
inline?: boolean
}[],
footer?: {
text: string,
icon_url?: string
},
image?: {
url: string
},
thumbnail?: {
url: string
},
author?: {
name: string,
url?: string,
icon_url?: string
},
timestamp?: string
}[]
reactions full type
reactions full type
{
count: number,
me: boolean,
emoji: {
id?: string | null,
name: string
}
}[]
components full type
components full type
{
type: number
}[]
message_reference full type
message_reference full type
{
message_id?: string,
channel_id?: string,
guild_id?: string
}
thread full type
thread full type
{
id: string,
type: number,
guild_id?: string,
name?: string | null,
topic?: string | null,
position?: number,
parent_id?: string | null,
last_message_id?: string | null,
owner_id?: string,
thread_metadata?: {
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}
}
Reactions
add
reactions.add
Add a reaction to a message
Risk: write
await corsair.discord.api.reactions.add({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
emoji | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
success | true | Yes | — |
list
reactions.list
List reactions on a message
Risk: read
await corsair.discord.api.reactions.list({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
emoji | string | Yes | — |
limit | number | No | — |
after | string | No | — |
object[]
Output full type
Output full type
{
id: string,
username: string,
discriminator: string,
global_name?: string | null,
avatar?: string | null,
bot?: boolean,
system?: boolean,
email?: string | null,
verified?: boolean,
locale?: string,
premium_type?: number,
public_flags?: number,
flags?: number
}[]
remove
reactions.remove
Remove a reaction from a message
Risk: write
await corsair.discord.api.reactions.remove({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
emoji | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
success | true | Yes | — |
Threads
create
threads.create
Create a new thread in a channel
Risk: write
await corsair.discord.api.threads.create({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
name | string | Yes | — |
auto_archive_duration | 60 | 1440 | 4320 | 10080 | No | — |
type | number | No | — |
invitable | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
type | number | Yes | — |
guild_id | string | No | — |
name | string | No | — |
topic | string | No | — |
position | number | No | — |
parent_id | string | No | — |
last_message_id | string | No | — |
owner_id | string | No | — |
thread_metadata | object | No | — |
thread_metadata full type
thread_metadata full type
{
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}
createFromMessage
threads.createFromMessage
Create a thread from an existing message
Risk: write
await corsair.discord.api.threads.createFromMessage({});
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | — |
message_id | string | Yes | — |
name | string | Yes | — |
auto_archive_duration | 60 | 1440 | 4320 | 10080 | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
type | number | Yes | — |
guild_id | string | No | — |
name | string | No | — |
topic | string | No | — |
position | number | No | — |
parent_id | string | No | — |
last_message_id | string | No | — |
owner_id | string | No | — |
thread_metadata | object | No | — |
thread_metadata full type
thread_metadata full type
{
archived: boolean,
auto_archive_duration: number,
archive_timestamp: string,
locked: boolean,
invitable?: boolean
}