Skip to content

Commit

Permalink
feat: add last missing toJSONs
Browse files Browse the repository at this point in the history
  • Loading branch information
TTtie committed Nov 18, 2024
1 parent 403fed8 commit fe3bfa1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/structures/AutoModerationRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,22 @@ class AutoModerationRule extends Base {
edit(options) {
return this.#client.editAutoModerationRule.call(this.#client, this.guildID, this.id, options);
}

toJSON(props = []) {
return super.toJSON([
"actions",
"creatorID",
"enabled",
"eventType",
"exemptRoles",
"exemptChannels",
"guildID",
"name",
"triggerMetadata",
"triggerType",
...props
]);
}
}

module.exports = AutoModerationRule;
13 changes: 13 additions & 0 deletions lib/structures/SoundboardSound.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ class SoundboardSound extends Base {
send(channelID) {
return this.#client.sendSoundboardSound.call(this.#client, channelID, {soundID: this.id, sourceGuildID: this.guild.id});
}

toJSON(props = []) {
return super.toJSON([
"available",
"emojiID",
"emojiName",
"guild",
"name",
"user",
"volume",
...props
]);
}
}

module.exports = SoundboardSound;
11 changes: 11 additions & 0 deletions lib/structures/StageInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ class StageInstance extends Base {
edit(options) {
return this.#client.editStageInstance.call(this.#client, this.channel.id, options);
}

toJSON(props = []) {
return super.toJSON([
"channel",
"guild",
"guildScheduledEvent",
"privacyLevel",
"topic",
...props
]);
}
}

module.exports = StageInstance;

0 comments on commit fe3bfa1

Please sign in to comment.