@discordjs/structures 0.2.0-dev.1771286636-ccce987fa → 0.2.0-dev.1772409857-fce498982

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5024,6 +5024,25 @@ var Subscription = class extends Structure {
5024
5024
  const createdTimestamp = this.createdTimestamp;
5025
5025
  return createdTimestamp ? new Date(createdTimestamp) : null;
5026
5026
  }
5027
+ /**
5028
+ * {@inheritDoc Structure.toJSON}
5029
+ */
5030
+ toJSON() {
5031
+ const clone = super.toJSON();
5032
+ const currentPeriodStartTimestamp = this[kCurrentPeriodStartTimestamp];
5033
+ const currentPeriodEndTimestamp = this[kCurrentPeriodEndTimestamp];
5034
+ const canceledTimestamp = this[kCanceledTimestamp];
5035
+ if (currentPeriodEndTimestamp) {
5036
+ clone.current_period_end = dateToDiscordISOTimestamp(new Date(currentPeriodEndTimestamp));
5037
+ }
5038
+ if (currentPeriodStartTimestamp) {
5039
+ clone.current_period_start = dateToDiscordISOTimestamp(new Date(currentPeriodStartTimestamp));
5040
+ }
5041
+ if (canceledTimestamp) {
5042
+ clone.canceled_at = dateToDiscordISOTimestamp(new Date(canceledTimestamp));
5043
+ }
5044
+ return clone;
5045
+ }
5027
5046
  };
5028
5047
  export {
5029
5048
  ActionRowComponent,