Class PrivateChannel

Represents a direct message with a user.

Hierarchy (view full)

Constructors

Properties

id: string
lastMessage?: null | Message<PrivateChannel>

The last message sent in this channel. This will only be present if a message has been sent within the current session.

lastMessageID: null | string

The ID of last message sent in this channel.

The cached messages in this channel.

recipient: User

The other user in this direct message.

type: DM

The type of this channel.

Accessors

  • get mention(): string
  • A string that will mention this channel.

    Returns string

Methods

  • Add a reaction to a message in this channel.

    Parameters

    • 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 a message in this channel.

    Parameters

    • messageID: string

      The ID of the message to delete.

    • Optional reason: string

      The reason for deleting the message.

    Returns Promise<void>

  • Remove a reaction from a message in this channel.

    Parameters

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

    Returns Promise<void>

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

    Parameters

    • messageID: string

      The iIDd 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 this channel.

    Parameters

    • messageID: string

      The ID of the message to pin.

    • Optional reason: string

      The reason for pinning the message.

    Returns Promise<void>

  • Unpin a message in this channel.

    Parameters

    • messageID: string

      The ID of the message to unpin.

    • Optional reason: string

      The ID for unpinning the message.

    Returns Promise<void>