Represents a public thread channel.

Hierarchy

Constructors

Properties

appliedTags: string[]

the IDs of the set of tags that have been applied to this thread. Forum channel threads only.

flags: number

The flags for this thread channel.

guildID: string

The id of the guild this channel is in.

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

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.

memberCount: number

The approximate number of members in this thread. Stops counting after 50.

members: ThreadMember[]

The members of this thread.

messageCount: number

The number of messages (not including the initial message or deleted messages) in the thread. Stops counting after 50.

The cached messages in this channel.

name: string

The name of this channel.

owner?: User

The owner of this thread.

ownerID: string

The ID of the owner of this thread.

parentID: string

The ID of the parent of this channel, if applicable.

rateLimitPerUser: number

The amount of seconds between non-moderators sending messages.

threadMetadata: ThreadMetadata

The thread metadata associated with this thread.

totalMessageSent: number

The total number of messages ever sent in the thread. Includes deleted messages.

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

    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>

  • Bulk delete messages in this thread.

    Parameters

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

  • Remove a reaction from a message in this thread.

    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.

    • 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

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