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
) : Promise<void>

Adds a reaction to a message

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

bulkDeleteMessages(
channelId: Snowflake
messageIds: Snowflake[]
reason?: string
) : Promise<void>

Bulk deletes messages

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

createMessage(
channelId: Snowflake
) : Promise<APIMessage>

Sends a message in a channel

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

crosspostMessage(
channelId: Snowflake
messageId: Snowflake
) : Promise<APIMessage>

Crossposts a message

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

deleteAllMessageReactions(
channelId: Snowflake
messageId: Snowflake
) : Promise<void>

Deletes all reactions for a message

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

deleteAllMessageReactionsForEmoji(
channelId: Snowflake
messageId: Snowflake
emoji: string
) : Promise<void>

Deletes all reactions of an emoji for a message

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

deleteMessage(
channelId: Snowflake
messageId: Snowflake
reason?: string
) : Promise<void>

Deletes a message

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

deleteOwnMessageReaction(
channelId: Snowflake
messageId: Snowflake
emoji: string
) : Promise<void>

Deletes a reaction for the current user

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

deleteUserMessageReaction(
channelId: Snowflake
messageId: Snowflake
emoji: string
userId: Snowflake
) : Promise<void>

Deletes a reaction for a user

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

followAnnouncements(
channelId: Snowflake
webhookChannelId: Snowflake
) : Promise<APIFollowedChannel>

Follows an announcement channel

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

Fetches the private joined archived threads of a channel

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

pinMessage(
channelId: Snowflake
messageId: Snowflake
reason?: string
) : Promise<void>

Pins a message in a channel

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

showTyping(
channelId: Snowflake
) : Promise<void>

Shows a typing indicator in a channel

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

unpinMessage(
channelId: Snowflake
messageId: Snowflake
reason?: string
) : Promise<void>

Unpins a message in a channel

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