Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
fix: Removed redundant .toJSON() from embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Cpt-Dingus committed Sep 1, 2023
1 parent 4dc0e57 commit 0aaaeab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/duck/duck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ duck.registerSubModule(
// Limit of four entries per page
if (fieldNumber >= 4) {
embed.setFields(fields);
payloads.push({embeds: [embed.toJSON()]});
payloads.push({embeds: [embed]});

// Resets the embed and fields so they can be used for the next iteration
embed = new EmbedBuilder()
Expand Down Expand Up @@ -661,7 +661,7 @@ duck.registerSubModule(
// Makes sure fields are added if the iteration didn't finish (the last 1-3 weren't added)
if (payloads.length % 4 !== 0) {
embed.setFields(fields);
payloads.push({embeds: [embed.toJSON()]});
payloads.push({embeds: [embed]});
}

new util.PaginatedMessage(interaction, payloads, 30);
Expand Down Expand Up @@ -700,7 +700,7 @@ duck.registerSubModule(
// Limit of four entries per page
if (fieldNumber >= 4) {
embed.setFields(fields);
payloads.push({embeds: [embed.toJSON()]});
payloads.push({embeds: [embed]});

// Resets the embed and fields so they can be used for the next iteration
embed = new EmbedBuilder()
Expand Down Expand Up @@ -732,7 +732,7 @@ duck.registerSubModule(
// Makes sure fields are added if the iteration didn't finish (the last 1-3 weren't added)
if (payloads.length % 4 !== 0) {
embed.setFields(fields);
payloads.push({embeds: [embed.toJSON()]});
payloads.push({embeds: [embed]});
}

new util.PaginatedMessage(interaction, payloads, 30);
Expand Down

0 comments on commit 0aaaeab

Please sign in to comment.