discord-typings
Advanced tools
Comparing version 10.0.1 to 10.0.2
@@ -1,2 +0,2 @@ | ||
import { Snowflake } from "../Reference"; | ||
import { Snowflake, Locale } from "../Reference"; | ||
@@ -6,7 +6,4 @@ /* | ||
*/ | ||
export type ApplicationCommand = { | ||
id: Snowflake; | ||
export type ApplicationCommandBase = { | ||
type?: ApplicationCommandType; | ||
application_id: Snowflake; | ||
guild_id?: Snowflake; | ||
/** 1-32 chars */ | ||
@@ -16,8 +13,30 @@ name: string; | ||
description: string; | ||
name_localizations?: { [locale in Locale]?: string; }; | ||
description_localizations?: { [locale in Locale]?: string; }; | ||
/** length of 25 max */ | ||
options?: Array<ApplicationCommandOption>; | ||
default_permission?: boolean; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object | ||
*/ | ||
export interface FetchedApplicationCommand extends ApplicationCommandBase { | ||
id: Snowflake; | ||
version: Snowflake; | ||
/** Not to be PUT. Only sometimes seen on GET requests */ | ||
name_localized?: string; | ||
/** Not to be PUT. Only sometimes seen on GET requests */ | ||
description_localized?: string; | ||
guild_id?: Snowflake; | ||
application_id: Snowflake; | ||
/** length of 25 max */ | ||
options?: Array<FetchedApplicationCommandOption>; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object | ||
*/ | ||
export type ApplicationCommand = ApplicationCommandBase | FetchedApplicationCommand; | ||
/** | ||
@@ -28,5 +47,10 @@ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
type ApplicationCommandOptionBase = { | ||
/** 1-32 chars */ | ||
name: string; | ||
name_localizations?: { [locale in Locale]?: string; }; | ||
description_localizations?: { [locale in Locale]?: string; }; | ||
/** 1-100 chars */ | ||
@@ -40,2 +64,42 @@ description: string; | ||
*/ | ||
export type FetchedApplicationCommandOptionBase = { | ||
/** Not to be PUT. Only sometimes seen on GET requests */ | ||
name_localized?: string; | ||
/** Not to be PUT. Only sometimes seen on GET requests */ | ||
description_localized?: string; | ||
} | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
export type FetchedApplicationCommandOptionAsTypeString = FetchedApplicationCommandOptionBase & ApplicationCommandOptionAsTypeString; | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
export type FetchedApplicationCommandOptionAsTypeNumber = FetchedApplicationCommandOptionBase & ApplicationCommandOptionAsTypeNumber; | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
export type FetchedApplicationCommandOptionAsTypeChannel = FetchedApplicationCommandOptionBase & ApplicationCommandOptionAsTypeChannel; | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
export type FetchedApplicationCommandOptionAsTypeSub = FetchedApplicationCommandOptionBase & ApplicationCommandOptionAsTypeSub; | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
export type FetchedApplicationCommandOptionNotTypeNarrowed = FetchedApplicationCommandOptionBase & ApplicationCommandOptionNotTypeNarrowed; | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
export type FetchedApplicationCommandOption = FetchedApplicationCommandOptionAsTypeString | FetchedApplicationCommandOptionAsTypeNumber | FetchedApplicationCommandOptionAsTypeChannel | FetchedApplicationCommandOptionAsTypeSub | FetchedApplicationCommandOptionNotTypeNarrowed; | ||
/** | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure | ||
*/ | ||
export interface ApplicationCommandOptionAsTypeString extends ApplicationCommandOptionBase { | ||
@@ -42,0 +106,0 @@ type: 3; |
@@ -57,3 +57,3 @@ export type Component = ActionRow | Button | SelectMenu | TextInput; | ||
options?: Array<SelectOption>; | ||
/** 1-100 chars */ | ||
/** 1-150 chars */ | ||
placeholder?: string; | ||
@@ -89,2 +89,3 @@ /** 0-25 */ | ||
style: TextInputStyle; | ||
/** 1-45 chars */ | ||
label: string; | ||
@@ -91,0 +92,0 @@ /** 0-4000 */ |
@@ -105,2 +105,3 @@ import { Snowflake } from "../Reference"; | ||
custom_id: string; | ||
/** 1-45 characters */ | ||
title: string; | ||
@@ -107,0 +108,0 @@ components: Array<import("./MessageComponents").ActionRow>; |
{ | ||
"name": "discord-typings", | ||
"version": "10.0.1", | ||
"version": "10.0.2", | ||
"description": "Typings for data returned by Discord (unofficial)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,3 +17,2 @@ import { Snowflake } from "../Reference"; | ||
owner?: import("./User").User; | ||
summary: string; | ||
verify_key: string; | ||
@@ -20,0 +19,0 @@ team: import("../Topics/Teams").Team | null; |
@@ -12,3 +12,3 @@ import { Snowflake } from "../Reference" | ||
name: string; | ||
description?: string; | ||
description?: string | null; | ||
scheduled_start_time: string; | ||
@@ -23,3 +23,3 @@ scheduled_end_time: string | null; | ||
user_count?: number; | ||
image: string | null; | ||
image?: string | null; | ||
} | ||
@@ -26,0 +26,0 @@ |
@@ -13,2 +13,3 @@ import { Snowflake } from "../Reference"; | ||
discoverable_disabled: boolean; | ||
guild_scheduled_event_id: Snowflake | null; | ||
} | ||
@@ -15,0 +16,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65147
1875