diff --git a/deno/rest/v8/channel.ts b/deno/rest/v8/channel.ts index 43bd9c2e..8a79ea46 100644 --- a/deno/rest/v8/channel.ts +++ b/deno/rest/v8/channel.ts @@ -9,7 +9,6 @@ import type { APIFollowedChannel, APIMessage, APIMessageReference, - APIOverwrite, APIUser, ChannelType, InviteTargetType, @@ -19,6 +18,10 @@ import type { } from '../../payloads/v8/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; +export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody { + id: Snowflake; +} + /** * https://discord.com/developers/docs/resources/channel#get-channel */ @@ -85,7 +88,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * * Channel types: all */ - permission_overwrites?: APIOverwrite[] | null; + permission_overwrites?: APIChannelPatchOverwrite[] | null; /** * ID of the new parent category for a channel * @@ -392,14 +395,18 @@ export interface RESTPutAPIChannelPermissionJSONBody { * The bitwise value of all allowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - allow: Permissions; + allow?: Permissions | null; /** * The bitwise value of all disallowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - deny: Permissions; + deny?: Permissions | null; /** * `0` for a role or `1` for a member */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index a895eb41..efc08bd8 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -9,7 +9,6 @@ import type { APIFollowedChannel, APIMessage, APIMessageReference, - APIOverwrite, APIThreadList, APIThreadMember, APIUser, @@ -22,6 +21,10 @@ import type { } from '../../payloads/v9/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; +export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody { + id: Snowflake; +} + /** * https://discord.com/developers/docs/resources/channel#get-channel */ @@ -88,7 +91,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * * Channel types: all excluding newsThread, publicThread, privateThread */ - permission_overwrites?: APIOverwrite[] | null; + permission_overwrites?: APIChannelPatchOverwrite[] | null; /** * ID of the new parent category for a channel * @@ -425,14 +428,18 @@ export interface RESTPutAPIChannelPermissionJSONBody { * The bitwise value of all allowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - allow: Permissions; + allow?: Permissions | null; /** * The bitwise value of all disallowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - deny: Permissions; + deny?: Permissions | null; /** * `0` for a role or `1` for a member */ diff --git a/rest/v8/channel.ts b/rest/v8/channel.ts index 458472ca..856cbd44 100644 --- a/rest/v8/channel.ts +++ b/rest/v8/channel.ts @@ -9,7 +9,6 @@ import type { APIFollowedChannel, APIMessage, APIMessageReference, - APIOverwrite, APIUser, ChannelType, InviteTargetType, @@ -19,6 +18,10 @@ import type { } from '../../payloads/v8/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; +export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody { + id: Snowflake; +} + /** * https://discord.com/developers/docs/resources/channel#get-channel */ @@ -85,7 +88,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * * Channel types: all */ - permission_overwrites?: APIOverwrite[] | null; + permission_overwrites?: APIChannelPatchOverwrite[] | null; /** * ID of the new parent category for a channel * @@ -392,14 +395,18 @@ export interface RESTPutAPIChannelPermissionJSONBody { * The bitwise value of all allowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - allow: Permissions; + allow?: Permissions | null; /** * The bitwise value of all disallowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - deny: Permissions; + deny?: Permissions | null; /** * `0` for a role or `1` for a member */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 71a42fea..35d08a60 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -9,7 +9,6 @@ import type { APIFollowedChannel, APIMessage, APIMessageReference, - APIOverwrite, APIThreadList, APIThreadMember, APIUser, @@ -22,6 +21,10 @@ import type { } from '../../payloads/v9/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; +export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody { + id: Snowflake; +} + /** * https://discord.com/developers/docs/resources/channel#get-channel */ @@ -88,7 +91,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * * Channel types: all excluding newsThread, publicThread, privateThread */ - permission_overwrites?: APIOverwrite[] | null; + permission_overwrites?: APIChannelPatchOverwrite[] | null; /** * ID of the new parent category for a channel * @@ -425,14 +428,18 @@ export interface RESTPutAPIChannelPermissionJSONBody { * The bitwise value of all allowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - allow: Permissions; + allow?: Permissions | null; /** * The bitwise value of all disallowed permissions * * See https://en.wikipedia.org/wiki/Bit_field + * + * @default "0" */ - deny: Permissions; + deny?: Permissions | null; /** * `0` for a role or `1` for a member */