mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
types(GuildScheduledEvent#scheduledStartAt): should be nullish (#8111)
This commit is contained in:
@@ -193,11 +193,12 @@ class GuildScheduledEvent extends Base {
|
||||
|
||||
/**
|
||||
* The time the guild scheduled event will start at
|
||||
* @type {Date}
|
||||
* <info>This can be potentially `null` only when it's an {@link AuditLogEntryTarget}</info>
|
||||
* @type {?Date}
|
||||
* @readonly
|
||||
*/
|
||||
get scheduledStartAt() {
|
||||
return new Date(this.scheduledStartTimestamp);
|
||||
return this.scheduledStartTimestamp && new Date(this.scheduledStartTimestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -1368,7 +1368,7 @@ export class GuildScheduledEvent<S extends GuildScheduledEventStatus = GuildSche
|
||||
public creator: User | null;
|
||||
public get createdTimestamp(): number;
|
||||
public get createdAt(): Date;
|
||||
public get scheduledStartAt(): Date;
|
||||
public get scheduledStartAt(): Date | null;
|
||||
public get scheduledEndAt(): Date | null;
|
||||
public get channel(): VoiceChannel | StageChannel | null;
|
||||
public get guild(): Guild | null;
|
||||
|
||||
Reference in New Issue
Block a user