From 5ea94a6629812820174589f2ac8ebe3765548b31 Mon Sep 17 00:00:00 2001 From: Denis-Adrian Cristea Date: Thu, 5 Mar 2026 15:53:53 +0200 Subject: [PATCH] feat: application command option allowed channel type (#1548) --- .../_interactions/_applicationCommands/_chatInput/channel.ts | 4 ++-- deno/payloads/v10/channel.ts | 5 +++++ .../_interactions/_applicationCommands/_chatInput/channel.ts | 4 ++-- payloads/v10/channel.ts | 5 +++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts index 85058815..450c7f61 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts @@ -1,10 +1,10 @@ import type { Snowflake } from '../../../../../globals.ts'; -import type { ChannelType } from '../../../channel.ts'; +import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel.ts'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; import type { ApplicationCommandOptionType } from './shared.ts'; export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase { - channel_types?: Exclude[]; + channel_types?: ApplicationCommandOptionAllowedChannelType[]; } export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index 135d9db4..54678893 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -75,6 +75,11 @@ export type TextChannelType = export type GuildChannelType = Exclude; +export type ApplicationCommandOptionAllowedChannelType = Exclude< + ChannelType, + ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory +>; + export interface APISlowmodeChannel extends APIChannelBase { /** * Amount of seconds a user has to wait before sending another message (0-21600); diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts index 048a0e63..44cb9678 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts @@ -1,10 +1,10 @@ import type { Snowflake } from '../../../../../globals'; -import type { ChannelType } from '../../../channel'; +import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase { - channel_types?: Exclude[]; + channel_types?: ApplicationCommandOptionAllowedChannelType[]; } export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index d8aa42ad..4798328b 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -75,6 +75,11 @@ export type TextChannelType = export type GuildChannelType = Exclude; +export type ApplicationCommandOptionAllowedChannelType = Exclude< + ChannelType, + ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory +>; + export interface APISlowmodeChannel extends APIChannelBase { /** * Amount of seconds a user has to wait before sending another message (0-21600);