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, options?):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
optionsPick<RequestData, 'signal'>YesThe options for adding the reaction
bulkDeleteMessages(channelId, messageIds, options?):Promise<void>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the messages are in
messageIdsSnowflake[]NoThe ids of the messages to delete
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for deleting the messages
createForumThread(channelId, body, options?):Promise<APIThreadChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the forum channel to start the thread in
bodyStartForumThreadOptionsNoThe data for starting the thread
optionsPick<RequestData, 'signal'>YesThe options for starting the thread
createInvite(channelId, body, options?):Promise<APIExtendedInvite>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to create an invite for
bodyRESTPostAPIChannelInviteJSONBodyNoThe data for creating the invite
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for creating the invite
createMessage(channelId, body, options?):Promise<APIMessage>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to send the message in
bodyRESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; }NoThe data for sending the message
optionsPick<RequestData, 'signal'>YesThe options for sending the message
createThread(channelId, body, messageId?, options?):Promise<APIChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to start the thread in
bodyRESTPostAPIChannelThreadsJSONBodyNoThe data for starting the thread
messageIdSnowflakeYesThe id of the message to start the thread from
optionsPick<RequestData, 'signal'>YesThe options for starting the thread
createWebhook(channelId, body, options?):Promise<APIWebhook>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to create the webhook in
bodyRESTPostAPIChannelWebhookJSONBodyNoThe data for creating the webhook
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for creating the webhook
crosspostMessage(channelId, messageId, options?):Promise<APIMessage>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to crosspost
optionsPick<RequestData, 'signal'>YesThe options for crossposting the message
delete(channelId, options?):Promise<APIChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to delete
optionsPick<RequestData, 'signal'>YesThe options for deleting the channel
deleteAllMessageReactions(channelId, messageId, options?):Promise<void>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete the reactions for
optionsPick<RequestData, 'signal'>YesThe options for deleting the reactions
deleteAllMessageReactionsForEmoji(channelId, messageId, emoji, options?):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
optionsPick<RequestData, 'signal'>YesThe options for deleting the reactions
deleteMessage(channelId, messageId, options?):Promise<void>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for deleting the message
deleteOwnMessageReaction(channelId, messageId, emoji, options?):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
optionsPick<RequestData, 'signal'>YesThe options for deleting the reaction
deletePermissionOverwrite(channelId, overwriteId, options?):Promise<void>
Deletes the permission overwrite for a user or role in a channel
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to delete the permission overwrite in
overwriteIdSnowflakeNoThe id of the user or role to delete the permission overwrite for
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for deleting the permission overwrite
deleteUserMessageReaction(channelId, messageId, emoji, userId, options?):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
optionsPick<RequestData, 'signal'>YesThe options for deleting the reaction
edit(channelId, body, options?):Promise<APIChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to edit
bodyRESTPatchAPIChannelJSONBodyNoThe new channel data
optionsPick<RequestData, 'signal'>YesThe options for editing the channel
editMessage(channelId, messageId, body, options?):Promise<APIMessage>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to edit
bodyRESTPatchAPIChannelMessageJSONBody & { files?: RawFile[]; }NoThe data for editing the message
optionsPick<RequestData, 'signal'>YesThe options for editing the message
editPermissionOverwrite(channelId, overwriteId, body, options?):Promise<void>
Edits the permission overwrite for a user or role in a channel
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to edit the permission overwrite in
overwriteIdSnowflakeNoThe id of the user or role to edit the permission overwrite for
bodyRESTPutAPIChannelPermissionJSONBodyNoThe data for editing the permission overwrite
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for editing the permission overwrite
followAnnouncements(channelId, webhookChannelId, options?):Promise<APIFollowedChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the announcement channel to follow
webhookChannelIdSnowflakeNoThe id of the webhook channel to follow the announcements in
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for following the announcement channel
get(channelId, options?):Promise<APIChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel
optionsPick<RequestData, 'signal'>YesThe options for fetching the channel
getArchivedThreads(channelId, archivedStatus, query?, options?):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 for fetching archived threads
optionsPick<RequestData, 'signal'>YesThe options for fetching archived threads
getInvites(channelId, options?):Promise<RESTGetAPIChannelInvitesResult>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch invites from
optionsPick<RequestData, 'signal'>YesThe options for fetching the invites
getJoinedPrivateArchivedThreads(channelId, query?, options?):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 for fetching joined archived threads
optionsPick<RequestData, 'signal'>YesThe options for fetching joined archived threads
getMessage(channelId, messageId, options?):Promise<APIMessage>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to fetch
optionsPick<RequestData, 'signal'>YesThe options for fetching the message
getMessageReactions(channelId, messageId, emoji, query?, options?):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 for fetching the reactions
optionsPick<RequestData, 'signal'>YesThe options for fetching the message reactions
getMessages(channelId, query?, options?):Promise<RESTGetAPIChannelMessagesResult>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch messages from
queryRESTGetAPIChannelMessagesQueryYesThe query options for fetching messages
optionsPick<RequestData, 'signal'>YesThe options for fetching the messages
getPins(channelId, options?):Promise<RESTGetAPIChannelPinsResult>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch pinned messages from
optionsPick<RequestData, 'signal'>YesThe options for fetching the pinned messages
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel
pinMessage(channelId, messageId, options?):Promise<void>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to pin the message in
messageIdSnowflakeNoThe id of the message to pin
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for pinning the message
showTyping(channelId, options?):Promise<void>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to show the typing indicator in
optionsPick<RequestData, 'signal'>YesThe options for showing the typing indicator
unpinMessage(channelId, messageId, options?):Promise<void>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to unpin the message in
messageIdSnowflakeNoThe id of the message to unpin
optionsPick<RequestData, 'reason' | 'signal'>YesThe options for unpinning the message