fix: webhook.editMessage

This commit is contained in:
Elysia 2023-05-07 10:18:49 +07:00
parent 4b2b0718a3
commit d4207a03af

View File

@ -324,10 +324,13 @@ class Webhook {
let messagePayload; let messagePayload;
if (options instanceof MessagePayload) messagePayload = options; if (options instanceof MessagePayload) {
else messagePayload = MessagePayload.create(this, options); messagePayload = await options.resolveData();
} else {
messagePayload = await MessagePayload.create(this, options).resolveData();
}
const { data, files } = await messagePayload.resolveData().resolveFiles(); const { data, files } = await messagePayload.resolveFiles();
const d = await this.client.api const d = await this.client.api
.webhooks(this.id, this.token) .webhooks(this.id, this.token)