Represents a guild announcement channel.

Hierarchy

Constructors

Properties

defaultAutoArchiveDuration: 60 | 1440 | 4320 | 10080

The default auto archive duration for threads created in this channel.

guildID: string

The id of the guild this channel is in.

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

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.

name: string

The name of this channel.

nsfw: boolean

If this channel is age gated.

parentID: null | string

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

permissionOverwrites: TypedCollection<string, RawOverwrite, PermissionOverwrite, []>

The permission overwrites of this channel.

position: number

The position of this channel on the sidebar.

rateLimitPerUser: 0

The amount of seconds between non-moderators sending messages. Always zero in announcement channels.

The threads in this channel.

topic: null | string

The topic of the channel.

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>

  • Bulk delete messages in this channel.

    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>

  • Delete a permission overwrite on this channel.

    Parameters

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

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

    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>

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

    Parameters

    • 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 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 reason for unpinning the message.

    Returns Promise<void>