From ed0049b78f4008460b0c7a2ec68eb38f018be3bd Mon Sep 17 00:00:00 2001 From: Almeida Date: Tue, 29 Mar 2022 18:38:05 +0100 Subject: [PATCH] refactor(APIGroupDMChannel): make `name` nullable (#347) BREAKING CHANGE: The `name` field is now also nullable for Group DM Channels --- deno/payloads/v10/channel.ts | 6 +++++- deno/payloads/v9/channel.ts | 6 +++++- payloads/v10/channel.ts | 6 +++++- payloads/v9/channel.ts | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index f563cf998..ffa925b0a 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -165,7 +165,7 @@ interface APIDMChannelBase extends APITextBasedChannel export type APIDMChannel = APIDMChannelBase; -export interface APIGroupDMChannel extends APIDMChannelBase { +export interface APIGroupDMChannel extends Omit, 'name'> { /** * Application id of the group DM creator if it is bot-created */ @@ -174,6 +174,10 @@ export interface APIGroupDMChannel extends APIDMChannelBase * Icon hash */ icon?: string | null; + /** + * The name of the channel (2-100 characters) + */ + name?: string | null; /** * ID of the DM creator */ diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index f563cf998..ffa925b0a 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -165,7 +165,7 @@ interface APIDMChannelBase extends APITextBasedChannel export type APIDMChannel = APIDMChannelBase; -export interface APIGroupDMChannel extends APIDMChannelBase { +export interface APIGroupDMChannel extends Omit, 'name'> { /** * Application id of the group DM creator if it is bot-created */ @@ -174,6 +174,10 @@ export interface APIGroupDMChannel extends APIDMChannelBase * Icon hash */ icon?: string | null; + /** + * The name of the channel (2-100 characters) + */ + name?: string | null; /** * ID of the DM creator */ diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 96be8c0ef..a16b5d6fc 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -165,7 +165,7 @@ interface APIDMChannelBase extends APITextBasedChannel export type APIDMChannel = APIDMChannelBase; -export interface APIGroupDMChannel extends APIDMChannelBase { +export interface APIGroupDMChannel extends Omit, 'name'> { /** * Application id of the group DM creator if it is bot-created */ @@ -174,6 +174,10 @@ export interface APIGroupDMChannel extends APIDMChannelBase * Icon hash */ icon?: string | null; + /** + * The name of the channel (2-100 characters) + */ + name?: string | null; /** * ID of the DM creator */ diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index 96be8c0ef..a16b5d6fc 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -165,7 +165,7 @@ interface APIDMChannelBase extends APITextBasedChannel export type APIDMChannel = APIDMChannelBase; -export interface APIGroupDMChannel extends APIDMChannelBase { +export interface APIGroupDMChannel extends Omit, 'name'> { /** * Application id of the group DM creator if it is bot-created */ @@ -174,6 +174,10 @@ export interface APIGroupDMChannel extends APIDMChannelBase * Icon hash */ icon?: string | null; + /** + * The name of the channel (2-100 characters) + */ + name?: string | null; /** * ID of the DM creator */