Represents a calendar channel.

Hierarchy (view full)

Constructors

  • Parameters

    • data: {
          archivedAt?: string;
          archivedBy?: string;
          categoryId?: number;
          createdAt: string;
          createdBy: string;
          groupId: string;
          id: string;
          messageId?: string;
          name: string;
          parentId?: string;
          priority?: number;
          rootId?: string;
          serverId: string;
          topic?: string;
          type: ServerChannelType;
          updatedAt?: string;
          visibility?: null | "private" | "public";
      }

      raw data

      • OptionalarchivedAt?: string

        Archived at Format: date-time

        The ISO 8601 timestamp that the channel was archived at, if relevant

      • OptionalarchivedBy?: string

        Archived by

        The ID of the user who archived this channel

      • OptionalcategoryId?: number

        The category that the channel exists in. Only relevant for server channels

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the channel was created at

      • createdBy: string

        Created by

        The ID of the user who created this channel

      • groupId: string

        Group ID

        The ID of the group

      • id: string

        Channel ID Format: uuid

        The ID of the channel

      • OptionalmessageId?: string

        Message ID Format: uuid

        The ID of the message that this channel was created off of. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present

      • name: string

        The name of the channel

      • OptionalparentId?: string

        Channel ID Format: uuid

        ID of the immediate parent channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present

      • Optionalpriority?: number

        Priority

        The priority of the channel will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by createdAt in ascending order. Due to legacy issues, sending a null value is not possible

      • OptionalrootId?: string

        Channel ID Format: uuid

        ID of the root channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present

      • serverId: string

        Server ID

        The ID of the server

      • Optionaltopic?: string

        The topic of the channel. Not applicable to threads

      • type: ServerChannelType

        The type of channel. This will determine what routes to use for creating content in a channel. For example, if this "chat", then one must use the routes for creating channel messages

      • OptionalupdatedAt?: string

        Updated at Format: date-time

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

      • Optionalvisibility?: null | "private" | "public"

        What users can access the channel. Only applicable to server channels. If not present, this channel will respect normal permissions. public is accessible to everyone, even those who aren't of the server. private is only accessible to explicitly mentioned users. Currently, threads cannot be public and other channels cannot be private. Additionally, private threads can only exist with an associated messageId that is for a private message

    • client: Client

      client

    Returns CalendarChannel

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

App'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

Guild ID

id: string

Item ID

isPublic: boolean

If the channel is public, this boolean is set to true.

name: string

Channel name

parentID: null | string

ID of the parent category.

scheduledEvents: TypedCollection<number, {
    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;
}, CalendarEvent, []>

Cached scheduled events.

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

type: string

Channel type

visibility: string

Channel visibility

Methods

  • Create an event in this channel.

    Parameters

    • options: CreateCalendarEventOptions

      Event options.

    • OptionalcreateSeries: {
          endDate?: string;
          endsAfterOccurrences?: number;
          every?: {
              count: number;
              interval: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval;
          };
          on?: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoOn[];
          type: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoType;
      }

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

      • OptionalendDate?: string

        Ends at Format: date-time

        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)

      • OptionalendsAfterOccurrences?: number

        Occurrences

        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)

      • Optionalevery?: {
            count: number;
            interval: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval;
        }

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

        • count: number

          Count

          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: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval

          Interval

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

      • Optionalon?: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoOn[]

        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)

      • type: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoType

        Repeat Type

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

        once
        @enum {string}

    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: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval;
          };
          on?: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoOn[];
          type: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoType;
      }

      Edit repetition options.

    Returns Promise<void>