Hierarchy

Constructors

Methods

  • Add a member to a thread.

    Returns

    Parameters

    • id: 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.

    Returns

    Parameters

    • id: 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.

    Returns

    Parameters

    • id: 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 an invite.

    Returns

    Type Parameters

    Parameters

    • code: string

      The code of the invite to delete.

    • Optional reason: string

      The reason for deleting the invite.

    Returns Promise<Invite<"withMetadata", T>>

  • Delete a message.

    Returns

    Parameters

    • id: 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.

    Returns

    Parameters

    • id: string

      The id of the channel to delete the messages in.

    • messageIDs: string[]

      The ids of the messages to delete. Between 2 and 100 messages, any dupliates or messages older than two weeks will cause an error.

    • Optional reason: string

      The reason for deleting the messages.

    Returns Promise<void>

  • Delete a permission overwrite.

    Returns

    Parameters

    • id: 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.

    Returns

    Parameters

    • id: 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.

    • Optional 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.

    Returns

    Parameters

    • id: 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>

  • Edit a permission overwrite.

    Returns

    Parameters

    • id: string

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

    • overwriteID: string

      The id of the permission overwrite to edit.

    • options: EditPermissionOptions

    Returns Promise<void>

  • Get the invites of a channel.

    Returns

    • An array of invites with metadata.

    Type Parameters

    Parameters

    • id: string

      The id of the channel to get the invites of.

    Returns Promise<Invite<"withMetadata", T>[]>

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

    Returns

    Parameters

    • id: 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

      Options for the request.

    Returns Promise<User[]>

  • Get a thread member.

    Returns

    Parameters

    • id: string

      The id of the thread.

    • userID: string

      The id of the user to get the thread member of.

    Returns Promise<ThreadMember>

  • Join a thread.

    Returns

    Parameters

    • id: string

      The id of the thread to join.

    Returns Promise<void>

  • Leave a thread.

    Returns

    Parameters

    • id: string

      The id of the thread to leave.

    Returns Promise<void>

  • Pin a message in a channel.

    Returns

    Parameters

    • id: 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.

    Returns

    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.

    Returns

    Parameters

    • id: 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.

    Returns

    Parameters

    • id: string

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

    Returns Promise<void>

  • Unpin a message in a channel.

    Returns

    Parameters

    • id: 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>