mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
refactor(APIMessage): remove unused declarations (#5836)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user