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;
if (options instanceof MessagePayload) messagePayload = options;
else messagePayload = MessagePayload.create(this, options);
if (options instanceof MessagePayload) {
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
.webhooks(this.id, this.token)