Interface ChannelOption

interface ChannelOption {
    channel_types?: (
        | GuildText
        | GuildVoice
        | GuildCategory
        | GuildAnnouncement
        | AnnouncementThread
        | PublicThread
        | PrivateThread
        | GuildStageVoice
        | GuildForum
        | GuildMedia
    )[];
    description: string;
    description_localizations?: Partial<Record<Locale, null | string>>;
    name: string;
    name_localizations?: Partial<Record<Locale, null | string>>;
    required?: boolean;
    type: "channel";
}

Hierarchy (View Summary)

Properties

channel_types?: (
    | GuildText
    | GuildVoice
    | GuildCategory
    | GuildAnnouncement
    | AnnouncementThread
    | PublicThread
    | PrivateThread
    | GuildStageVoice
    | GuildForum
    | GuildMedia
)[]

The allowed channel types for this option. This should be an array of ApplicationCommandOptionAllowedChannelTypes. If not specified, all channel types are allowed.

description: string

The description of the option. This should be a string that describes what the option does.

description_localizations?: Partial<Record<Locale, null | string>>

The localizations for the command description. This should be an object where the keys are locale codes and the values are the localized descriptions.

{ "en-US": "This is my command" }
name: string

The name of the command, subcommand, subcommand group, option. This should be a lowercase string with no spaces. It can only contain alphanumeric characters, underscores, and dashes.

name_localizations?: Partial<Record<Locale, null | string>>

The localizations for the command name. This should be an object where the keys are locale codes and the values are the localized names.

{ "en-US": "My Command" }
required?: boolean

Whether the option is required. If true, the user must provide a value for this option. If false, the user can skip this option.

type: "channel"

The type of the option. This should be one of the following:

  • "channel": A channel option