Search...

ChannelsAPI

declare class ChannelsAPI 
declare class ChannelsAPI 

No summary provided.

constructor(rest)

Constructs a new instance of the ChannelsAPI class
NameTypeOptionalDescription
restRESTNoNone

addMessageReaction(channelId, messageId, emoji)

:

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

bulkDeleteMessages(channelId, messageIds, reason?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the messages are in
messageIdsSnowflake[]NoThe ids of the messages to delete
reasonstringYesNone

createInvite(channelId, data, reason?)

:

Promise<discord_api_types_v10.APIExtendedInvite>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to create an invite for
dataRESTPostAPIChannelInviteJSONBodyNoThe data to use when creating the invite
reasonstringYesNone

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

:

Promise<discord_api_types_v10.APIMessage>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to send the message in
{ files, ...body }RESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; }NoNone

crosspostMessage(channelId, messageId)

:

Promise<discord_api_types_v10.APIMessage>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to crosspost

delete(channelId)

:

Promise<discord_api_types_v10.APIChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to delete

deleteAllMessageReactions(channelId, messageId)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete the reactions for

deleteAllMessageReactionsForEmoji(channelId, messageId, emoji)

:

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

deleteMessage(channelId, messageId, reason?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to delete
reasonstringYesThe reason for deleting the message

deleteOwnMessageReaction(channelId, messageId, emoji)

:

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

deleteUserMessageReaction(channelId, messageId, emoji, userId)

:

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

edit(channelId, data)

:

Promise<discord_api_types_v10.APIChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to edit
dataRESTPatchAPIChannelJSONBodyNoThe new channel data

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

:

Promise<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

followAnnouncements(channelId, webhookChannelId)

:

Promise<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

get(channelId)

:

Promise<discord_api_types_v10.APIChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel

getArchivedThreads(channelId, archivedStatus, 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
optionsRESTGetAPIChannelThreadsArchivedQueryYesThe options to use when fetching archived threads

getInvites(channelId)

:

Promise<RESTGetAPIChannelInvitesResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch invites from

getJoinedPrivateArchivedThreads(channelId, options?)

:

Promise<RESTGetAPIChannelUsersThreadsArchivedResult>

Fetches the private joined archived threads of a channel
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch joined archived threads from
optionsRESTGetAPIChannelThreadsArchivedQueryYesThe options to use when fetching joined archived threads

getMessage(channelId, messageId)

:

Promise<discord_api_types_v10.APIMessage>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel the message is in
messageIdSnowflakeNoThe id of the message to fetch

getMessageReactions(channelId, messageId, emoji, 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
optionsRESTGetAPIChannelMessageReactionUsersQueryYesThe options to use when fetching the reactions

getMessages(channelId, options?)

:

Promise<RESTGetAPIChannelMessagesResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch messages from
optionsRESTGetAPIChannelMessagesQueryYesThe options to use when fetching messages

getPins(channelId)

:

Promise<RESTGetAPIChannelPinsResult>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch pinned messages from

pinMessage(channelId, messageId, reason?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to pin the message in
messageIdSnowflakeNoThe id of the message to pin
reasonstringYesThe reason for pinning the message

showTyping(channelId)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to show the typing indicator in

unpinMessage(channelId, messageId, reason?)

:

Promise<void>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to unpin the message in
messageIdSnowflakeNoThe id of the message to unpin
reasonstringYesThe reason for unpinning the message