CalendarEvent represents an event coming from a calendar channel.

Hierarchy (view full)

  • Base<number>
    • CalendarEvent

Constructors

  • Parameters

    • data: {
          autofillWaitlist?: boolean;
          cancellation?: {
              createdBy: string;
              description?: string;
          };
          channelId: string;
          color?: number;
          createdAt: string;
          createdBy: string;
          description?: string;
          duration?: number;
          groupId: string;
          id: number;
          isAllDay?: boolean;
          isPrivate?: boolean;
          location?: string;
          mentions?: {
              channels?: {
                  id: string;
              }[];
              everyone?: boolean;
              here?: boolean;
              roles?: {
                  id: number;
              }[];
              users?: {
                  id: string;
              }[];
          };
          name: string;
          repeats?: boolean;
          roleIds?: number[];
          rsvpDisabled?: boolean;
          rsvpLimit?: number;
          seriesId?: string;
          serverId: string;
          startsAt: string;
          url?: string;
      }

      raw data.

      • OptionalautofillWaitlist?: boolean

        When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event

      • Optionalcancellation?: {
            createdBy: string;
            description?: string;
        }
        • createdBy: string

          Created by

          The ID of the user who created this event cancellation

        • Optionaldescription?: string

          Description Format: long-form markdown

          The description of event cancellation

      • channelId: string

        Channel ID Format: uuid

        The ID of the channel

      • Optionalcolor?: number

        The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the event was created at

      • createdBy: string

        Created by

        The ID of the user who created this event

      • Optionaldescription?: string

        Description Format: long-form markdown

        The description of the event

      • Optionalduration?: number

        Duration

        The duration of the event in minutes

      • groupId: string

        Group ID

        The ID of the group

      • id: number

        Calendar event ID

        The ID of the calendar event

      • OptionalisAllDay?: boolean

        Is all day

        Does the event last all day

      • OptionalisPrivate?: boolean

        Is private

      • Optionallocation?: string

        Location

        The location of the event

      • 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

      • name: string

        Name

        The name of the event

      • Optionalrepeats?: boolean

        Is this event a repeating event

      • OptionalroleIds?: number[]

        Role IDs

        The role IDs to restrict the event to

      • OptionalrsvpDisabled?: boolean

        RSVP disabled

        When disabled, users will not be able to RSVP to the event

      • OptionalrsvpLimit?: number

        The number of RSVPs to allow before waitlisting RSVPs

      • OptionalseriesId?: string

        Calendar event series ID Format: uuid

        The ID of the calendar event series. Only shows if the event is repeating

      • serverId: string

        Server ID

        The ID of the server

      • startsAt: string

        Starts at Format: date-time

        The ISO 8601 timestamp that the event starts at

      • Optionalurl?: string

        Format: uri

        A URL to associate with the event

    • client: Client

      client.

    Returns CalendarEvent

Properties

cancellation: undefined | null | {
    createdBy: string;
    description?: string;
}

Details about event cancellation (if canceled)

Type declaration

  • createdBy: string

    Created by

    The ID of the user who created this event cancellation

  • Optionaldescription?: string

    Description Format: long-form markdown

    The description of event cancellation

channelID: string

ID of the channel the event was created on.

client: Client

App's client.

color: null | number

Event color in calendar.

comments: TypedCollection<number, {
    calendarEventId: number;
    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;
}, CalendarComment, []>

Cached Comments

Type declaration

  • calendarEventId: number

    Calendar event ID

    The ID of the calendar event

  • channelId: string

    Channel ID Format: uuid

    The ID of the channel

  • content: string

    Content Format: long-form markdown

    The content of the calendar event comment

  • createdAt: string

    Created at Format: date-time

    The ISO 8601 timestamp that the calendar event comment was created at

  • createdBy: string

    Created by

    The ID of the user who created this calendar event 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

    Calendar event comment ID

    The ID of the calendar event 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 calendar event comment was updated at, if relevant

createdAt: null | Date

When the event was created.

data: {
    autofillWaitlist?: boolean;
    cancellation?: {
        createdBy: string;
        description?: string;
    };
    channelId: string;
    color?: number;
    createdAt: string;
    createdBy: string;
    description?: string;
    duration?: number;
    groupId: string;
    id: number;
    isAllDay?: boolean;
    isPrivate?: boolean;
    location?: string;
    mentions?: {
        channels?: {
            id: string;
        }[];
        everyone?: boolean;
        here?: boolean;
        roles?: {
            id: number;
        }[];
        users?: {
            id: string;
        }[];
    };
    name: string;
    repeats?: boolean;
    roleIds?: number[];
    rsvpDisabled?: boolean;
    rsvpLimit?: number;
    seriesId?: string;
    serverId: string;
    startsAt: string;
    url?: string;
}

Raw data

Type declaration

  • OptionalautofillWaitlist?: boolean

    When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event

  • Optionalcancellation?: {
        createdBy: string;
        description?: string;
    }
    • createdBy: string

      Created by

      The ID of the user who created this event cancellation

    • Optionaldescription?: string

      Description Format: long-form markdown

      The description of event cancellation

  • channelId: string

    Channel ID Format: uuid

    The ID of the channel

  • Optionalcolor?: number

    The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar

  • createdAt: string

    Created at Format: date-time

    The ISO 8601 timestamp that the event was created at

  • createdBy: string

    Created by

    The ID of the user who created this event

  • Optionaldescription?: string

    Description Format: long-form markdown

    The description of the event

  • Optionalduration?: number

    Duration

    The duration of the event in minutes

  • groupId: string

    Group ID

    The ID of the group

  • id: number

    Calendar event ID

    The ID of the calendar event

  • OptionalisAllDay?: boolean

    Is all day

    Does the event last all day

  • OptionalisPrivate?: boolean

    Is private

  • Optionallocation?: string

    Location

    The location of the event

  • 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

  • name: string

    Name

    The name of the event

  • Optionalrepeats?: boolean

    Is this event a repeating event

  • OptionalroleIds?: number[]

    Role IDs

    The role IDs to restrict the event to

  • OptionalrsvpDisabled?: boolean

    RSVP disabled

    When disabled, users will not be able to RSVP to the event

  • OptionalrsvpLimit?: number

    The number of RSVPs to allow before waitlisting RSVPs

  • OptionalseriesId?: string

    Calendar event series ID Format: uuid

    The ID of the calendar event series. Only shows if the event is repeating

  • serverId: string

    Server ID

    The ID of the server

  • startsAt: string

    Starts at Format: date-time

    The ISO 8601 timestamp that the event starts at

  • Optionalurl?: string

    Format: uri

    A URL to associate with the event

description: null | string

Event's description

duration: number

Duration in ms of the event.

guildID: string

Guild/server ID

id: number

Item ID

isPrivate: boolean

If true, this event is private.

location: null | string

Event user-specified location

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

Mentions in this calendar event.

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

name: string

Name of the event

ownerID: string

ID of the owner of this event.

rsvpLimit: null | number

Limit of event entry.

rsvps: TypedCollection<number, {
    calendarEventId: number;
    channelId: string;
    createdAt: string;
    createdBy: string;
    serverId: string;
    status: CalendarEventRsvpStatus;
    updatedAt?: string;
    updatedBy?: string;
    userId: string;
}, CalendarEventRSVP, []>

Cached RSVPS.

Type declaration

  • calendarEventId: number

    Calendar event ID

    The ID of the calendar event

  • channelId: string

    Channel ID Format: uuid

    The ID of the channel

  • createdAt: string

    Created at Format: date-time

    The ISO 8601 timestamp that the RSVP was created at

  • createdBy: string

    Created by

    The ID of the user who created this RSVP

  • serverId: string

    Server ID

    The ID of the server

  • status: CalendarEventRsvpStatus

    Status

    The status of the RSVP

  • OptionalupdatedAt?: string

    Updated at Format: date-time

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

  • OptionalupdatedBy?: string

    Updated by

    The ID of the user who updated this RSVP

  • userId: string

    User ID Format: user-id

    The ID of the user

startsAt: null | Date

Timestamp (unix epoch time) of the event starting time.

url: null | string

Event user-specified url

Accessors

  • get owner():
        | undefined
        | User
        | Member
        | Promise<Member>
  • Retrieve the event's owner, if cached.

    Note: this getter can output: Member, User, Promise or undefined.

    Returns
        | undefined
        | User
        | Member
        | Promise<Member>

Methods

  • Delete this event

    Returns Promise<void>