Various methods for interacting with channels.

Hierarchy

  • Channels

Constructors

Methods

  • Add a member to a thread.

    Parameters

    • channelID: string

      The ID of the thread to add them to.

    • userID: string

      The ID of the user to add to the thread.

    Returns Promise<void>

  • Add a reaction to a message.

    Parameters

    • channelID: string

      The ID of the channel the message is in.

    • messageID: string

      The ID of the message to add a reaction to.

    • emoji: string

      The reaction to add to the message. name:id for custom emojis, and the unicode codepoint for default emojis.

    Returns Promise<void>

  • Delete or close a channel.

    Parameters

    • channelID: string

      The ID of the channel to delete or close.

    • Optional reason: string

      The reason to be displayed in the audit log.

    Returns Promise<void>

  • Delete a message.

    Parameters

    • channelID: string

      The ID of the channel to delete the message in.

    • messageID: string

      The ID of the message to delete.

    • Optional reason: string

      The reason for deleting the message.

    Returns Promise<void>

  • Bulk delete messages.

    Parameters

    • channelID: string

      The ID of the channel to delete the messages in.

    • messageIDs: string[]

      The IDs of the messages to delete. Any duplicates or messages older than two weeks will cause an error.

    • Optional reason: string

      The reason for deleting the messages.

    Returns Promise<number>

  • Delete a permission overwrite.

    Parameters

    • channelID: string

      The ID of the channel to delete the permission overwrite in.

    • overwriteID: string

      The ID of the permission overwrite to delete.

    • Optional reason: string

      The reason for deleting the permission overwrite.

    Returns Promise<void>

  • Remove a reaction from a message.

    Parameters

    • channelID: string

      The ID of the channel the message is in.

    • messageID: string

      The ID of the message to remove a reaction from.

    • emoji: string

      The reaction to remove from the message. name:id for custom emojis, and the unicode codepoint for default emojis.

    • user: string = "@me"

      The user to remove the reaction from, @me for the current user (default).

    Returns Promise<void>

  • Remove all, or a specific emoji's reactions from a message.

    Parameters

    • channelID: string

      The ID of the channel the message is in.

    • messageID: string

      The ID of the message to remove reactions from.

    • Optional emoji: string

      The reaction to remove from the message. name:id for custom emojis, and the unicode codepoint for default emojis. Omit to remove all reactions.

    Returns Promise<void>

  • Delete a stage instance.

    Parameters

    • channelID: string

      The ID of the channel to delete the stage instance on.

    • Optional reason: string

      The reason for deleting the stage instance.

    Returns Promise<void>

  • Edit a permission overwrite.

    Parameters

    • channelID: string

      The ID of the channel to edit the permission overwrite for.

    • overwriteID: string

      The ID of the permission overwrite to edit.

    • options: EditPermissionOptions

      The options for editing the permission overwrite.

    Returns Promise<void>

  • Follow an announcement channel.

    Parameters

    • channelID: string

      The ID of the channel to follow announcements from.

    • webhookChannelID: string

      The ID of the channel crossposted messages should be sent to. The client must have the MANAGE_WEBHOOKS permission in this channel.

    Returns Promise<FollowedChannel>

  • Get the users who reacted with a specific emoji on a message.

    Parameters

    • channelID: string

      The ID of the channel the message is in.

    • messageID: string

      The ID of the message to get reactions from.

    • emoji: string

      The reaction to remove from the message. name:id for custom emojis, and the unicode codepoint for default emojis.

    • Optional options: GetReactionsOptions

      The options for getting the reactions.

    Returns Promise<User[]>

  • Pin a message in a channel.

    Parameters

    • channelID: string

      The ID of the channel to pin the message in.

    • messageID: string

      The ID of the message to pin.

    • Optional reason: string

      The reason for pinning the message.

    Returns Promise<void>

  • Remove a user from the group channel.

    Parameters

    • groupID: string

      The ID of the group to remove the user from.

    • userID: string

      The ID of the user to remove.

    Returns Promise<void>

  • Remove a member from a thread.

    Parameters

    • channelID: string

      The ID of the thread to remove them from.

    • userID: string

      The ID of the user to remove from the thread.

    Returns Promise<void>

  • Show a typing indicator in a channel. How long users see this varies from client to client.

    Parameters

    • channelID: string

      The ID of the channel to show the typing indicator in.

    Returns Promise<void>

  • Unpin a message in a channel.

    Parameters

    • channelID: string

      The ID of the channel to unpin the message in.

    • messageID: string

      The ID of the message to unpin.

    • Optional reason: string

      The reason for unpinning the message.

    Returns Promise<void>