From 02693bc02f45980d8165820a103220f0027b96b7 Mon Sep 17 00:00:00 2001 From: Jan <66554238+vaporox@users.noreply.github.com> Date: Sat, 12 Jun 2021 13:11:57 +0200 Subject: [PATCH] refactor(APIMessage): remove unused declarations (#5836) --- src/structures/APIMessage.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/structures/APIMessage.js b/src/structures/APIMessage.js index 1c26df9b9..b755ba162 100644 --- a/src/structures/APIMessage.js +++ b/src/structures/APIMessage.js @@ -142,11 +142,6 @@ class APIMessage { } } - const embedLikes = []; - if (this.options.embeds) { - embedLikes.push(...this.options.embeds); - } - const components = this.options.components?.map(c => BaseMessageComponent.create( Array.isArray(c) ? { type: MessageComponentTypes.ACTION_ROW, components: c } : c, @@ -216,22 +211,6 @@ class APIMessage { async resolveFiles() { if (this.files) return this; - const embedLikes = []; - - if (this.options.embeds) { - embedLikes.push(...this.options.embeds); - } - - const fileLikes = []; - if (this.options.files) { - fileLikes.push(...this.options.files); - } - for (const embed of embedLikes) { - if (embed.files) { - fileLikes.push(...embed.files); - } - } - this.files = await Promise.all(this.options.files?.map(file => this.constructor.resolveFile(file)) ?? []); return this; }