mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
add: webhook thread support
This commit is contained in:
@@ -66,9 +66,9 @@ export async function sendWebhook(
|
||||
|
||||
const result = await rest.runMethod<Message>(
|
||||
"post",
|
||||
`${endpoints.WEBHOOK(webhookId, webhookToken)}${
|
||||
options.wait ? "?wait=true" : ""
|
||||
}`,
|
||||
`${endpoints.WEBHOOK(webhookId, webhookToken)}?wait=${
|
||||
options.wait ? "true" : "false"
|
||||
}${options.threadId ? `&thread_id=${options.threadId}` : ""}`,
|
||||
{
|
||||
...options,
|
||||
allowed_mentions: options.allowedMentions,
|
||||
|
||||
@@ -7,6 +7,8 @@ import { SnakeCasedPropertiesDeep } from "../util.ts";
|
||||
export interface ExecuteWebhook {
|
||||
/** Waits for server confirmation of message send before response, and returns the created message body (defaults to `false`; when `false` a message that is not saved does not return an error) */
|
||||
wait?: boolean;
|
||||
/** Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. */
|
||||
threadId?: bigint;
|
||||
/** The message contents (up to 2000 characters) */
|
||||
content?: string;
|
||||
/** Override the default username of the webhook */
|
||||
|
||||
Reference in New Issue
Block a user