Represents a calendar channel.

Hierarchy

Constructors

Properties

archivedAt: null | Date

When the channel was last archived.

archivedBy: null | string

ID of the member that archived the channel (if archived)

categoryID: null | number

ID of the category the channel is in.

client: Client

Bot's client.

createdAt: Date

When this channel was created.

creatorID: string

ID of the member who created this channel.

description: null | string

Channel description

editedTimestamp: null | Date

Timestamp at which this channel was last edited.

groupID: string

ID of the group the channel is in.

guildID: string

Server ID

id: string

Item ID

isPublic: boolean
name: string

Channel name

parentID: null | string

ID of the parent category.

scheduledEvents: TypedCollection<number, APICalendarEvent, CalendarEvent, []>

Cached scheduled events.

type: string

Channel type

visibility: string

Channel visibility

Methods

  • Create an event in this channel.

    Parameters

    • options: CreateCalendarEventOptions

      Event options.

    • Optional createSeries: {
          endDate?: string;
          endsAfterOccurrences?: number;
          every?: {
              count: number;
              interval: "day" | "week" | "month" | "year";
          };
          on?: ("sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday")[];
          type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom";
      }

      (optional) Create a series. (event's repetition)

      • Optional endDate?: string

        The ISO 8601 timestamp that the event ends at. Used to control the end date of the event repeat (only used when type is custom; if used with endsAfterOccurrences, the earliest resultant date of the two will be used)

      • Optional endsAfterOccurrences?: number

        Used to control the end date of the event repeat (only used when type is custom; if used with endDate, the earliest resultant date of the two will be used) (max 24)

      • Optional every?: {
            count: number;
            interval: "day" | "week" | "month" | "year";
        }

        Apply further clarification to your events. This must have type set to custom

        • count: number

          How often between your interval the event should repeat. For example, 1 would be every interval, 2 would be every second occurrence of the interval

        • interval: "day" | "week" | "month" | "year"

          Coupled with count, this indicates the time range you are repeating your event over

      • Optional on?: ("sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday")[]

        Used to control the day of the week that the event should repeat on (only used when type is custom and when every.interval is week) (min items 1)

      • type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom"

        How often you want your event to repeat (important note: this will repeat for the next 180 days unless custom is defined) (default once)

    Returns Promise<CalendarEvent>

  • Delete an event from this channel.

    Parameters

    • eventID: number

      ID of the event to delete.

    Returns Promise<void>

  • Delete an event series set in this channel.

    Parameters

    • eventID: number

      ID of the event.

    • seriesID: string

      ID of the series.

    Returns Promise<void>

  • Edit an event series set in this channel.

    Parameters

    • eventID: number

      ID of the event.

    • seriesID: string

      ID of the series.

    • options: undefined | {
          endDate?: string;
          endsAfterOccurrences?: number;
          every?: {
              count: number;
              interval: "day" | "week" | "month" | "year";
          };
          on?: ("sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday")[];
          type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom";
      }

      Edit repetition options.

    Returns Promise<void>