Search...

ChannelsAPI

export declare class ChannelsAPI 
export declare class ChannelsAPI 

No summary provided.

constructor(rest)

Constructs a new instance of the ChannelsAPI class
NameTypeOptionalDescription
restRESTNoNone

addMessageReaction(channelId, messageId, emoji, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to add the reaction to
emojistringNoThe emoji to add the reaction with
{ signal }Pick<RequestData, 'signal'>YesNone

bulkDeleteMessages(channelId, messageIds, { reason, signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the messages are in
messageIdsSnowflake[]NoThe ids of the messages to delete
{ reason, signal }Pick<RequestData, 'reason' | 'signal'>YesNone

createInvite(channelId, body, { reason, signal }?)

:

Promise<import("discord-api-types/v10").APIExtendedInvite>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to create an invite for
bodyRESTPostAPIChannelInviteJSONBodyNoThe data to use when creating the invite
{ reason, signal }Pick<RequestData, 'reason' | 'signal'>YesNone

createMessage(channelId, { files, ...body }, { signal }?)

:

Promise<import("discord-api-types/v10").APIMessage>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to send the message in
{ files, ...body }RESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; }NoNone
{ signal }Pick<RequestData, 'signal'>YesNone

crosspostMessage(channelId, messageId, { signal }?)

:

Promise<import("discord-api-types/v10").APIMessage>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to crosspost
{ signal }Pick<RequestData, 'signal'>YesNone

delete(channelId, { signal }?)

:

Promise<import("discord-api-types/v10").APIChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to delete
{ signal }Pick<RequestData, 'signal'>YesNone

deleteAllMessageReactions(channelId, messageId, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete the reactions for
{ signal }Pick<RequestData, 'signal'>YesNone

deleteAllMessageReactionsForEmoji(channelId, messageId, emoji, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete the reactions for
emojistringNoThe emoji to delete the reactions for
{ signal }Pick<RequestData, 'signal'>YesNone

deleteMessage(channelId, messageId, { reason, signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete
{ reason, signal }Pick<RequestData, 'reason' | 'signal'>YesNone

deleteOwnMessageReaction(channelId, messageId, emoji, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete the reaction for
emojistringNoThe emoji to delete the reaction for
{ signal }Pick<RequestData, 'signal'>YesNone

deleteUserMessageReaction(channelId, messageId, emoji, userId, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete the reaction for
emojistringNoThe emoji to delete the reaction for
userIdSnowflakeNoThe id of the user to delete the reaction for
{ signal }Pick<RequestData, 'signal'>YesNone

edit(channelId, body, { signal }?)

:

Promise<import("discord-api-types/v10").APIChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to edit
bodyRESTPatchAPIChannelJSONBodyNoThe new channel data
{ signal }Pick<RequestData, 'signal'>YesNone

editMessage(channelId, messageId, { files, ...body }, { signal })

:

Promise<import("discord-api-types/v10").APIMessage>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to edit
{ files, ...body }RESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; }NoNone
{ signal }Pick<RequestData, 'signal'>NoNone

followAnnouncements(channelId, webhookChannelId, { signal }?)

:

Promise<import("discord-api-types/v10").APIFollowedChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the announcement channel to follow
webhookChannelIdSnowflakeNoThe id of the webhook channel to follow the announcements in
{ signal }Pick<RequestData, 'signal'>YesNone

get(channelId, { signal }?)

:

Promise<import("discord-api-types/v10").APIChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel
{ signal }Pick<RequestData, 'signal'>YesNone

getArchivedThreads(channelId, archivedStatus, query?, { signal }?)

:

Promise<RESTGetAPIChannelUsersThreadsArchivedResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch archived threads from
archivedStatus'private' | 'public'NoThe archived status of the threads to fetch
queryRESTGetAPIChannelThreadsArchivedQueryYesThe options to use when fetching archived threads
{ signal }Pick<RequestData, 'signal'>YesNone

getInvites(channelId, { signal }?)

:

Promise<RESTGetAPIChannelInvitesResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch invites from
{ signal }Pick<RequestData, 'signal'>YesNone

getJoinedPrivateArchivedThreads(channelId, query?, { signal }?)

:

Promise<RESTGetAPIChannelUsersThreadsArchivedResult>

Fetches the private joined archived threads of a channel
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch joined archived threads from
queryRESTGetAPIChannelThreadsArchivedQueryYesThe options to use when fetching joined archived threads
{ signal }Pick<RequestData, 'signal'>YesNone

getMessage(channelId, messageId, { signal }?)

:

Promise<import("discord-api-types/v10").APIMessage>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to fetch
{ signal }Pick<RequestData, 'signal'>YesNone

getMessageReactions(channelId, messageId, emoji, query?, { signal }?)

:

Promise<RESTGetAPIChannelMessageReactionUsersResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to get the reactions for
emojistringNoThe emoji to get the reactions for
queryRESTGetAPIChannelMessageReactionUsersQueryYesThe query options to use when fetching the reactions
{ signal }Pick<RequestData, 'signal'>YesNone

getMessages(channelId, query?, { signal }?)

:

Promise<RESTGetAPIChannelMessagesResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch messages from
queryRESTGetAPIChannelMessagesQueryYesThe query options to use when fetching messages
{ signal }Pick<RequestData, 'signal'>YesNone

getPins(channelId, { signal }?)

:

Promise<RESTGetAPIChannelPinsResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch pinned messages from
{ signal }Pick<RequestData, 'signal'>YesNone

getWebhooks(id)

:

Promise<RESTGetAPIChannelWebhooksResult>

NameTypeOptionalDescription
idSnowflakeNoThe id of the channel

pinMessage(channelId, messageId, { reason, signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to pin the message in
messageIdSnowflakeNoThe id of the message to pin
{ reason, signal }Pick<RequestData, 'reason' | 'signal'>YesNone

showTyping(channelId, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to show the typing indicator in
{ signal }Pick<RequestData, 'signal'>YesNone

unpinMessage(channelId, messageId, { reason, signal }?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to unpin the message in
messageIdSnowflakeNoThe id of the message to unpin
{ reason, signal }Pick<RequestData, 'reason' | 'signal'>YesNone