mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types: remove fields that cannot be set by the client (#10711)
* types: remove fields that cannot be set by the client * chore: cleanup JS lands too * chore: requested changes --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -41,15 +41,12 @@ class GuildScheduledEventManager extends CachedManager {
|
||||
* Options for setting a recurrence rule for a guild scheduled event.
|
||||
* @typedef {Object} GuildScheduledEventRecurrenceRuleOptions
|
||||
* @property {DateResolvable} startAt The time the recurrence rule interval starts at
|
||||
* @property {?DateResolvable} endAt The time the recurrence rule interval ends at
|
||||
* @property {GuildScheduledEventRecurrenceRuleFrequency} frequency How often the event occurs
|
||||
* @property {number} interval The spacing between the events
|
||||
* @property {?GuildScheduledEventRecurrenceRuleWeekday[]} byWeekday The days within a week to recur on
|
||||
* @property {?GuildScheduledEventRecurrenceRuleNWeekday[]} byNWeekday The days within a week to recur on
|
||||
* @property {?GuildScheduledEventRecurrenceRuleMonth[]} byMonth The months to recur on
|
||||
* @property {?number[]} byMonthDay The days within a month to recur on
|
||||
* @property {?number[]} byYearDay The days within a year to recur on
|
||||
* @property {?number} count The total amount of times the event is allowed to recur before stopping
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,16 +63,12 @@ function _transformAPIMessageInteractionMetadata(client, messageInteractionMetad
|
||||
function _transformGuildScheduledEventRecurrenceRule(recurrenceRule) {
|
||||
return {
|
||||
start: new Date(recurrenceRule.startAt).toISOString(),
|
||||
// eslint-disable-next-line eqeqeq
|
||||
end: recurrenceRule.endAt != null ? new Date(recurrenceRule.endAt).toISOString() : recurrenceRule.endAt,
|
||||
frequency: recurrenceRule.frequency,
|
||||
interval: recurrenceRule.interval,
|
||||
by_weekday: recurrenceRule.byWeekday,
|
||||
by_n_weekday: recurrenceRule.byNWeekday,
|
||||
by_month: recurrenceRule.byMonth,
|
||||
by_month_day: recurrenceRule.byMonthDay,
|
||||
by_year_day: recurrenceRule.byYearDay,
|
||||
count: recurrenceRule.count,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -5979,8 +5979,6 @@ type BaseGuildScheduledEventRecurrenceRuleOptions<
|
||||
Extra extends {},
|
||||
> = {
|
||||
startAt: DateResolvable;
|
||||
endAt?: DateResolvable;
|
||||
count?: number;
|
||||
interval: number;
|
||||
frequency: Frequency;
|
||||
} & Extra;
|
||||
|
||||
Reference in New Issue
Block a user