GuildScheduledEvent
Represents a Discord guild scheduled event. The REST routes already existed, but the payloads were only returned as raw camel-cased objects from gateway hooks. This structure centralizes date parsing, lifecycle helpers, subscriber listing, and guild-scoped CRUD. https://docs.discord.com/developers/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
Signature
export interface GuildScheduledEvent extends DiscordBase, ObjectToLower<Omit<APIGuildScheduledEvent, 'creator'>>Properties
23Methods
6Properties
creator?: UserStructure;startAtGetterget startAt(): Date | undefined;The start time of the event as a `Date`.
endAtGetterget endAt(): Date | undefined;The end time of the event as a `Date`, when Discord provides one.
isExternalGetterget isExternal(): boolean;Whether the event takes place outside Discord (no channel).
id: string;createdTimestampGetterget createdTimestamp(): number;Create a timestamp for the current object.
createdAtGetterget createdAt(): Date;createdAt gets the creation Date instace of the current object.
readonly client: UsingClient;description?: string | null | undefined;channelId: string | null;guildId: string;status: GuildScheduledEventStatus;name: string;creatorId?: string | null | undefined;entityMetadata: { location: string; } | null;scheduledStartTime: string;scheduledEndTime: string | null;privacyLevel: GuildScheduledEventPrivacyLevel;entityType: GuildScheduledEventEntityType;entityId: string | null;userCount?: number | undefined;image?: string | null | undefined;recurrenceRule: { start: string; end: string | null; frequency: GuildScheduledEventRecurrenceRuleFrequency; interval: number; byWeekday: GuildScheduledEventRecurrenceRuleWeekday[] | null; byNWeekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null; byMonth: GuildScheduledEventRecurrenceRuleMonth[] | null; byMonthDay: number[] | null; byYearDay: number[] | null; count: number | null; } | null;Methods
coverURL(options?: BaseCDNUrlOptions): string | undefined;CDN URL for the event cover image, when the event has one.
guild(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;guild(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;fetch(query?: RESTGetAPIGuildScheduledEventQuery): Promise<GuildScheduledEventStructure>;Refetches this event from Discord.
subscribers(query?: RESTGetAPIGuildScheduledEventUsersQuery): Promise<GuildScheduledSubscriberStructure[]>;Lists users subscribed to this event.
edit(body: RESTPatchAPIGuildScheduledEventJSONBody, reason?: string): Promise<GuildScheduledEventStructure>;Edits this event.
delete(reason?: string): Promise<undefined>;Deletes this event.