diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 509de2e66..bf997008e 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -112,7 +112,7 @@ class Webhook { } if (options.files) { - for (const i in options.files) { + for (let i = 0; i < options.files.length; i++) { let file = options.files[i]; if (typeof file === 'string') file = { attachment: file }; if (!file.name) { diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index f7fde7319..8fb7995ec 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -88,7 +88,7 @@ class TextBasedChannel { } if (options.files) { - for (const i in options.files) { + for (let i = 0; i < options.files.length; i++) { let file = options.files[i]; if (typeof file === 'string') file = { attachment: file }; if (!file.name) {