fix: set with_components when sending components through webhooks

This commit is contained in:
Vlad Frangu
2025-04-26 03:57:04 +03:00
parent d920933dc5
commit 8cdbe23766

View File

@@ -214,12 +214,14 @@ class Webhook {
messagePayload = MessagePayload.create(this, options).resolveBody();
}
const { body, files } = await messagePayload.resolveFiles();
const query = makeURLSearchParams({
wait: true,
thread_id: messagePayload.options.threadId,
with_components: body?.components?.length > 0,
});
const { body, files } = await messagePayload.resolveFiles();
const d = await this.client.rest.post(Routes.webhook(this.id, this.token), {
body,
files,