swc/bundler/tests/.cache/deno/ee8348e7cd62ce54244583674e601be9a1425073.ts
강동윤 d60c3242af
fix(swc): Fix bugs (#1739)
swc_bundler:
 - Fix cycle detection for complex circular imports. (denoland/deno#10752)

swc_ecma_transforms_typescript:
 - Allow using large values for an enum variant.
2021-05-25 14:30:17 +09:00

79 lines
3.0 KiB
TypeScript

// Loaded from https://deno.land/x/discordeno@11.0.0-rc.2/src/types/interactions/commands/application_command_interaction_data_option.ts
import { DiscordApplicationCommandOptionTypes } from "./application_command_option_types.ts";
/** https://discord.com/developers/docs/interactions/slash-commands#interaction-applicationcommandinteractiondataoption */
export type ApplicationCommandInteractionDataOption =
| ApplicationCommandInteractionDataOptionSubCommand
| ApplicationCommandInteractionDataOptionSubCommandGroup
| ApplicationCommandInteractionDataOptionWithValue;
export type ApplicationCommandInteractionDataOptionWithValue =
| ApplicationCommandInteractionDataOptionString
| ApplicationCommandInteractionDataOptionInteger
| ApplicationCommandInteractionDataOptionBoolean
| ApplicationCommandInteractionDataOptionUser
| ApplicationCommandInteractionDataOptionChannel
| ApplicationCommandInteractionDataOptionRole
| ApplicationCommandInteractionDataOptionMentionable;
interface ApplicationCommandInteractionDataOptionBase<T extends DiscordApplicationCommandOptionTypes, V = unknown> {
/** The name of the parameter */
name: string;
/** Type of the option */
type: T;
/** The value of the pair */
value: V;
}
export interface ApplicationCommandInteractionDataOptionSubCommand
extends Omit<ApplicationCommandInteractionDataOptionBase<DiscordApplicationCommandOptionTypes.SubCommand>, "value"> {
/** Present if this option is a group or subcommand */
options?: ApplicationCommandInteractionDataOptionWithValue[];
}
export interface ApplicationCommandInteractionDataOptionSubCommandGroup
extends Omit<
ApplicationCommandInteractionDataOptionBase<DiscordApplicationCommandOptionTypes.SubCommandGroup>,
"value"
> {
/** Present if this option is a group or subcommand */
options?: ApplicationCommandInteractionDataOptionSubCommand[];
}
export type ApplicationCommandInteractionDataOptionString = ApplicationCommandInteractionDataOptionBase<
DiscordApplicationCommandOptionTypes.String,
string
>;
export type ApplicationCommandInteractionDataOptionInteger = ApplicationCommandInteractionDataOptionBase<
DiscordApplicationCommandOptionTypes.Integer,
number
>;
export type ApplicationCommandInteractionDataOptionBoolean = ApplicationCommandInteractionDataOptionBase<
DiscordApplicationCommandOptionTypes.Boolean,
boolean
>;
export type ApplicationCommandInteractionDataOptionUser = ApplicationCommandInteractionDataOptionBase<
DiscordApplicationCommandOptionTypes.User,
string
>;
export type ApplicationCommandInteractionDataOptionChannel = ApplicationCommandInteractionDataOptionBase<
DiscordApplicationCommandOptionTypes.Channel,
string
>;
export type ApplicationCommandInteractionDataOptionRole = ApplicationCommandInteractionDataOptionBase<
DiscordApplicationCommandOptionTypes.Role,
string
>;
export type ApplicationCommandInteractionDataOptionMentionable = ApplicationCommandInteractionDataOptionBase<
DiscordApplicationCommandOptionTypes.Mentionable,
string
>;