From 7ab780b3aefb3c8c34a8114db3ace6c4e6ae3206 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Mon, 13 Dec 2021 10:08:39 +0100 Subject: [PATCH] fix: only a partial object is needed when updating attachments (#263) --- deno/rest/v8/channel.ts | 2 +- deno/rest/v8/webhook.ts | 2 +- deno/rest/v9/channel.ts | 2 +- deno/rest/v9/webhook.ts | 2 +- rest/v8/channel.ts | 2 +- rest/v8/webhook.ts | 2 +- rest/v9/channel.ts | 2 +- rest/v9/webhook.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deno/rest/v8/channel.ts b/deno/rest/v8/channel.ts index 80c6a092e..e3b249385 100644 --- a/deno/rest/v8/channel.ts +++ b/deno/rest/v8/channel.ts @@ -331,7 +331,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; /** * The components to include with the message * diff --git a/deno/rest/v8/webhook.ts b/deno/rest/v8/webhook.ts index 61016d50b..e89c1ca8d 100644 --- a/deno/rest/v8/webhook.ts +++ b/deno/rest/v8/webhook.ts @@ -234,7 +234,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; } /** diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index a88bbdd68..cd193cb61 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -365,7 +365,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; /** * The components to include with the message * diff --git a/deno/rest/v9/webhook.ts b/deno/rest/v9/webhook.ts index 0b73eb9fe..48960dcce 100644 --- a/deno/rest/v9/webhook.ts +++ b/deno/rest/v9/webhook.ts @@ -238,7 +238,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; } /** diff --git a/rest/v8/channel.ts b/rest/v8/channel.ts index 1eba17a70..e402f4d12 100644 --- a/rest/v8/channel.ts +++ b/rest/v8/channel.ts @@ -331,7 +331,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; /** * The components to include with the message * diff --git a/rest/v8/webhook.ts b/rest/v8/webhook.ts index 5169f6e3e..b2e99aebf 100644 --- a/rest/v8/webhook.ts +++ b/rest/v8/webhook.ts @@ -234,7 +234,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; } /** diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 744d172f9..3fa2fa7ec 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -365,7 +365,7 @@ export interface RESTPatchAPIChannelMessageJSONBody { * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; /** * The components to include with the message * diff --git a/rest/v9/webhook.ts b/rest/v9/webhook.ts index e63c48db1..72b6c0103 100644 --- a/rest/v9/webhook.ts +++ b/rest/v9/webhook.ts @@ -238,7 +238,7 @@ export interface RESTPatchAPIWebhookWithTokenMessageJSONBody * * See https://discord.com/developers/docs/resources/channel#attachment-object */ - attachments?: APIAttachment[] | null; + attachments?: (Pick & Partial>)[]; } /**