class ChannelsAPI

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

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

Bulk deletes messages

Creates a new invite for a channel

Sends a message in a channel

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

Crossposts a message

Deletes a channel

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

Deletes all reactions for a message

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

Deletes all reactions of an emoji for a message

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

Deletes a message

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

Deletes a reaction for the current user

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

Deletes a reaction for a user

editMessage(
channelId: Snowflake
messageId: Snowflake
) : Promise<discord_api_types_v10.APIMessage>

Edits a message

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

Follows an announcement channel

Fetches a channel

getArchivedThreads(
channelId: Snowflake
archivedStatus: 'private' | 'public'
) : Promise<RESTGetAPIChannelUsersThreadsArchivedResult>

Fetches the archived threads of a channel

Fetches the invites of a channel

Fetches the private joined archived threads of a channel

getMessage(
channelId: Snowflake
messageId: Snowflake
) : Promise<discord_api_types_v10.APIMessage>

Fetches a message

Fetches the reactions for a message

Fetches the messages of a channel

Fetches the pinned messages of a channel

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

Pins a message in a channel

showTyping(
channelId: Snowflake
) : Promise<void>

Shows a typing indicator in a channel

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

Unpins a message in a channel