From 8e5f07e2eebc14e5777dbfb932ef54f252165524 Mon Sep 17 00:00:00 2001 From: Vitor Date: Sat, 4 Jun 2022 15:52:22 +0100 Subject: [PATCH] feat(RESTPostAPIWebhookWithTokenJSONBody): add `thread_name` (#463) * feat(RESTPostAPIWebhookWithTokenJSONBody): add `thread_name` * docs: update from upstream * docs: make it clear --- deno/rest/v10/webhook.ts | 8 ++++++++ deno/rest/v9/webhook.ts | 8 ++++++++ rest/v10/webhook.ts | 8 ++++++++ rest/v9/webhook.ts | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/deno/rest/v10/webhook.ts b/deno/rest/v10/webhook.ts index 40ca2f1c..d77f7036 100644 --- a/deno/rest/v10/webhook.ts +++ b/deno/rest/v10/webhook.ts @@ -144,6 +144,12 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * Message flags combined as a bitfield */ flags?: MessageFlags; + /** + * Name of thread to create + * + * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter + */ + thread_name: string; }>; /** @@ -171,6 +177,8 @@ export interface RESTPostAPIWebhookWithTokenQuery { wait?: boolean; /** * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. + * + * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified */ thread_id?: Snowflake; } diff --git a/deno/rest/v9/webhook.ts b/deno/rest/v9/webhook.ts index 6e9325ed..38c4dc6b 100644 --- a/deno/rest/v9/webhook.ts +++ b/deno/rest/v9/webhook.ts @@ -144,6 +144,12 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * Message flags combined as a bitfield */ flags?: MessageFlags; + /** + * Name of thread to create + * + * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter + */ + thread_name: string; }>; /** @@ -171,6 +177,8 @@ export interface RESTPostAPIWebhookWithTokenQuery { wait?: boolean; /** * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. + * + * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified */ thread_id?: Snowflake; } diff --git a/rest/v10/webhook.ts b/rest/v10/webhook.ts index 8b84a9cf..f60d29f1 100644 --- a/rest/v10/webhook.ts +++ b/rest/v10/webhook.ts @@ -144,6 +144,12 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * Message flags combined as a bitfield */ flags?: MessageFlags; + /** + * Name of thread to create + * + * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter + */ + thread_name: string; }>; /** @@ -171,6 +177,8 @@ export interface RESTPostAPIWebhookWithTokenQuery { wait?: boolean; /** * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. + * + * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified */ thread_id?: Snowflake; } diff --git a/rest/v9/webhook.ts b/rest/v9/webhook.ts index b3ad1f4f..8bfc39d6 100644 --- a/rest/v9/webhook.ts +++ b/rest/v9/webhook.ts @@ -144,6 +144,12 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * Message flags combined as a bitfield */ flags?: MessageFlags; + /** + * Name of thread to create + * + * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter + */ + thread_name: string; }>; /** @@ -171,6 +177,8 @@ export interface RESTPostAPIWebhookWithTokenQuery { wait?: boolean; /** * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. + * + * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified */ thread_id?: Snowflake; }