Represents a channel announcement.

Hierarchy (view full)

  • Base<string>
    • Announcement

Constructors

  • Parameters

    • data: {
          channelId: string;
          content: string;
          createdAt: string;
          createdBy: string;
          groupId: string;
          id: string;
          mentions?: {
              channels?: {
                  id: string;
              }[];
              everyone?: boolean;
              here?: boolean;
              roles?: {
                  id: number;
              }[];
              users?: {
                  id: string;
              }[];
          };
          serverId: string;
          title: string;
      }

      raw data.

      • channelId: string

        Channel ID Format: uuid

        The ID of the channel

      • content: string

        Content Format: long-form markdown

        The content of the announcement

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the announcement was created at

      • createdBy: string

        Created by

        The ID of the user who created this announcement

      • groupId: string

        Group ID

        The ID of the group

      • id: string

        Announcement ID

        The ID of the announcement

      • Optionalmentions?: {
            channels?: {
                id: string;
            }[];
            everyone?: boolean;
            here?: boolean;
            roles?: {
                id: number;
            }[];
            users?: {
                id: string;
            }[];
        }
        • Optionalchannels?: {
              id: string;
          }[]

          Channels

          Info on mentioned channels

        • Optionaleveryone?: boolean

          Everyone

          If

          was mentioned

        • Optionalhere?: boolean

          Here

          If

          was mentioned

        • Optionalroles?: {
              id: number;
          }[]

          Roles

          Info on mentioned roles

        • Optionalusers?: {
              id: string;
          }[]

          Users

          Info on mentioned users

      • serverId: string

        Server ID

        The ID of the server

      • title: string

        Title

        The title of the announcement

    • client: Client

      client.

    Returns Announcement

Properties

channelID: string

ID of the channel the announcement is in

client: Client

App's client.

comments: TypedCollection<number, {
    announcementId: string;
    channelId: string;
    content: string;
    createdAt: string;
    createdBy: string;
    id: number;
    mentions?: {
        channels?: {
            id: string;
        }[];
        everyone?: boolean;
        here?: boolean;
        roles?: {
            id: number;
        }[];
        users?: {
            id: string;
        }[];
    };
    updatedAt?: string;
}, AnnouncementComment, []>

Cached announcement's comments

Type declaration

  • announcementId: string

    Announcement ID

    The ID of the announcement

  • channelId: string

    Channel ID Format: uuid

    The ID of the channel

  • content: string

    Content Format: long-form markdown

    The content of the announcement comment

  • createdAt: string

    Created at Format: date-time

    The ISO 8601 timestamp that the announcement comment was created at

  • createdBy: string

    Created by

    The ID of the user who created this announcement comment (Note: If this event has createdByWebhookId present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA)

  • id: number

    Announcement comment ID

    The ID of the announcement comment

  • Optionalmentions?: {
        channels?: {
            id: string;
        }[];
        everyone?: boolean;
        here?: boolean;
        roles?: {
            id: number;
        }[];
        users?: {
            id: string;
        }[];
    }
    • Optionalchannels?: {
          id: string;
      }[]

      Channels

      Info on mentioned channels

    • Optionaleveryone?: boolean

      Everyone

      If

      was mentioned

    • Optionalhere?: boolean

      Here

      If

      was mentioned

    • Optionalroles?: {
          id: number;
      }[]

      Roles

      Info on mentioned roles

    • Optionalusers?: {
          id: string;
      }[]

      Users

      Info on mentioned users

  • OptionalupdatedAt?: string

    Updated at Format: date-time

    The ISO 8601 timestamp that the announcement comment was updated at, if relevant

content: string

The announcement's content

createdAt: Date

The ISO 8601 timestamp that the announcement was created at

guildID: string

ID of the guild.

id: string

Item ID

memberID: string

The ID of the member who created this announcement

mentions: null | {
    channels?: {
        id: string;
    }[];
    everyone?: boolean;
    here?: boolean;
    roles?: {
        id: number;
    }[];
    users?: {
        id: string;
    }[];
}

Mentions.

Type declaration

  • Optionalchannels?: {
        id: string;
    }[]

    Channels

    Info on mentioned channels

  • Optionaleveryone?: boolean

    Everyone

    If

    was mentioned

  • Optionalhere?: boolean

    Here

    If

    was mentioned

  • Optionalroles?: {
        id: number;
    }[]

    Roles

    Info on mentioned roles

  • Optionalusers?: {
        id: string;
    }[]

    Users

    Info on mentioned users

title: string

The announcement's title.

Methods

  • Create an announcement in the same Announcement channel as this one.

    Parameters

    • options: {
          content: string | Record<string, never>;
          title: string;
      }

      Create options.

      • content: string | Record<string, never>

        Content

        The content of the announcement

      • title: string

        Title

        The title of the announcement

    Returns Promise<Announcement>

  • Add a reaction to this announcement.

    Parameters

    • emoteID: number

      ID of the emote to add

    Returns Promise<void>

  • Remove a reaction from this announcement.

    Parameters

    • emoteID: number

      ID of the emote to remove

    Returns Promise<void>

  • Edit this announcement.

    Parameters

    • options: {
          content?: string | Record<string, never>;
          title?: string;
      }

      Edit options

      • Optionalcontent?: string | Record<string, never>

        Content

        The content of the announcement

      • Optionaltitle?: string

        Title

        The title of the announcement

    Returns Promise<Announcement>