class ChannelsAPI

export declare class ChannelsAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the ChannelsAPI class

addMessageReaction(
channelId: Snowflake
messageId: Snowflake
emoji: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Adds a reaction to a message

See also: https://discord.com/developers/docs/resources/channel#create-reactionundefined

bulkDeleteMessages(
channelId: Snowflake
messageIds: Snowflake[]
options?: Pick<RequestData, 'reason' | 'signal'>
) : Promise<void>

Bulk deletes messages

See also: https://discord.com/developers/docs/resources/channel#bulk-delete-messagesundefined

createInvite(
channelId: Snowflake
options?: Pick<RequestData, 'reason' | 'signal'>
) : Promise<APIExtendedInvite>

Creates a new invite for a channel

See also: https://discord.com/developers/docs/resources/channel#create-channel-inviteundefined

createMessage(
channelId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIMessage>

Sends a message in a channel

See also: https://discord.com/developers/docs/resources/channel#create-messageundefined

crosspostMessage(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIMessage>

Crossposts a message

See also: https://discord.com/developers/docs/resources/channel#crosspost-messageundefined

deleteAllMessageReactions(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Deletes all reactions for a message

See also: https://discord.com/developers/docs/resources/channel#delete-all-reactionsundefined

deleteAllMessageReactionsForEmoji(
channelId: Snowflake
messageId: Snowflake
emoji: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Deletes all reactions of an emoji for a message

See also: https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emojiundefined

deleteMessage(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'reason' | 'signal'>
) : Promise<void>

Deletes a message

See also: https://discord.com/developers/docs/resources/channel#delete-messageundefined

deleteOwnMessageReaction(
channelId: Snowflake
messageId: Snowflake
emoji: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Deletes a reaction for the current user

See also: https://discord.com/developers/docs/resources/channel#delete-own-reactionundefined

deleteUserMessageReaction(
channelId: Snowflake
messageId: Snowflake
emoji: string
userId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Deletes a reaction for a user

See also: https://discord.com/developers/docs/resources/channel#delete-user-reactionundefined

editMessage(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIMessage>

Edits a message

See also: https://discord.com/developers/docs/resources/channel#edit-messageundefined

followAnnouncements(
channelId: Snowflake
webhookChannelId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIFollowedChannel>

Follows an announcement channel

See also: https://discord.com/developers/docs/resources/channel#follow-announcement-channelundefined

getJoinedPrivateArchivedThreads(
channelId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIChannelUsersThreadsArchivedResult>

Fetches the private joined archived threads of a channel

See also: https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threadsundefined

getMessage(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIMessage>

Fetches a message

See also: https://discord.com/developers/docs/resources/channel#get-channel-messageundefined

getPins(
channelId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIChannelPinsResult>

Fetches the pinned messages of a channel

See also: https://discord.com/developers/docs/resources/channel#get-pinned-messagesundefined

pinMessage(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'reason' | 'signal'>
) : Promise<void>

Pins a message in a channel

See also: https://discord.com/developers/docs/resources/channel#pin-messageundefined

showTyping(
channelId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Shows a typing indicator in a channel

See also: https://discord.com/developers/docs/resources/channel#trigger-typing-indicatorundefined

unpinMessage(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'reason' | 'signal'>
) : Promise<void>

Unpins a message in a channel

See also: https://discord.com/developers/docs/resources/channel#unpin-messageundefined