Skip to content

Commit

Permalink
Improving loops based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pdellaert committed Jul 27, 2023
1 parent a940bfd commit 1e79d8c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/handlers/messagedelete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ module.exports = {
}
});
}
for (let i = 0; i < messageEmbeds.length; i++) {
const messageEmbed = messageEmbeds[i];
for (const messageEmbed of messageEmbeds) {
const { image, fields } = messageEmbed;
if (image) {
messageComponents.push(`<${image.url}>`);
}
for (let j = 0; j < fields.length; j++) {
const field = fields[i];
for (const field of fields) {
const { name, value } = field;
if (name && value) {
messageComponents.push(`${name}: ${value}`);
Expand Down

0 comments on commit 1e79d8c

Please sign in to comment.