mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-23 03:40:17 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ecf9b2c16 | ||
|
|
fe1f5313a8 | ||
|
|
0cf51abc26 | ||
|
|
751aee6fa7 | ||
|
|
9f4f59c8e5 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
||||
## [0.26.1](https://github.com/discordjs/discord-api-types/compare/0.26.0...0.26.1) (2022-01-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **APIApplicationCommandOption:** correct type for integer and number ([#284](https://github.com/discordjs/discord-api-types/issues/284)) ([fe1f531](https://github.com/discordjs/discord-api-types/commit/fe1f5313a8fc13d0a2433738cce9be37f5d9eeb5))
|
||||
|
||||
### Features
|
||||
|
||||
- **APIAuditLogChangeData:** Add `communication_disabled_until` ([#281](https://github.com/discordjs/discord-api-types/issues/281)) ([0cf51ab](https://github.com/discordjs/discord-api-types/commit/0cf51abc267bd6246a7952e7f6a23fa8c5db290a))
|
||||
- **APIGuildScheduledEvent:** add more precise types for stage instance/voice/external events ([#278](https://github.com/discordjs/discord-api-types/issues/278)) ([751aee6](https://github.com/discordjs/discord-api-types/commit/751aee6fa7d4c542324a30e9b9bc641b0e7a8bf4))
|
||||
- **ApplicationFlags:** add embedded application flags ([#277](https://github.com/discordjs/discord-api-types/issues/277)) ([9f4f59c](https://github.com/discordjs/discord-api-types/commit/9f4f59c8e55f78caf614e27e28b6bca939665ca5))
|
||||
|
||||
# [0.26.0](https://github.com/discordjs/discord-api-types/compare/0.25.2...0.26.0) (2021-12-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
## [0.26.1](https://github.com/discordjs/discord-api-types/compare/0.26.0...0.26.1) (2022-01-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **APIApplicationCommandOption:** correct type for integer and number ([#284](https://github.com/discordjs/discord-api-types/issues/284)) ([fe1f531](https://github.com/discordjs/discord-api-types/commit/fe1f5313a8fc13d0a2433738cce9be37f5d9eeb5))
|
||||
|
||||
### Features
|
||||
|
||||
- **APIAuditLogChangeData:** Add `communication_disabled_until` ([#281](https://github.com/discordjs/discord-api-types/issues/281)) ([0cf51ab](https://github.com/discordjs/discord-api-types/commit/0cf51abc267bd6246a7952e7f6a23fa8c5db290a))
|
||||
- **APIGuildScheduledEvent:** add more precise types for stage instance/voice/external events ([#278](https://github.com/discordjs/discord-api-types/issues/278)) ([751aee6](https://github.com/discordjs/discord-api-types/commit/751aee6fa7d4c542324a30e9b9bc641b0e7a8bf4))
|
||||
- **ApplicationFlags:** add embedded application flags ([#277](https://github.com/discordjs/discord-api-types/issues/277)) ([9f4f59c](https://github.com/discordjs/discord-api-types/commit/9f4f59c8e55f78caf614e27e28b6bca939665ca5))
|
||||
|
||||
# [0.26.0](https://github.com/discordjs/discord-api-types/compare/0.25.2...0.26.0) (2021-12-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
} from './_chatInput/string.ts';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOptionBase,
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer.ts';
|
||||
import type {
|
||||
@@ -38,7 +38,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
} from './_chatInput/mentionable.ts';
|
||||
import type {
|
||||
APIApplicationCommandNumberOptionBase,
|
||||
APIApplicationCommandNumberOption,
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
} from './_chatInput/number.ts';
|
||||
import type {
|
||||
@@ -67,13 +67,13 @@ export * from './_chatInput/shared.ts';
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandStringOption
|
||||
| APIApplicationCommandIntegerOptionBase
|
||||
| APIApplicationCommandIntegerOption
|
||||
| APIApplicationCommandBooleanOption
|
||||
| APIApplicationCommandUserOption
|
||||
| APIApplicationCommandChannelOption
|
||||
| APIApplicationCommandRoleOption
|
||||
| APIApplicationCommandMentionableOption
|
||||
| APIApplicationCommandNumberOptionBase;
|
||||
| APIApplicationCommandNumberOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
|
||||
@@ -97,6 +97,7 @@ export interface APIApplication {
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
*/
|
||||
export enum ApplicationFlags {
|
||||
EmbeddedReleased = 1 << 1,
|
||||
ManagedEmoji = 1 << 2,
|
||||
GroupDMCreate = 1 << 4,
|
||||
RPCHasConnected = 1 << 11,
|
||||
@@ -108,4 +109,5 @@ export enum ApplicationFlags {
|
||||
Embedded = 1 << 17,
|
||||
GatewayMessageContent = 1 << 18,
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
EmbeddedFirstParty = 1 << 20,
|
||||
}
|
||||
|
||||
@@ -320,7 +320,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyGuildId
|
||||
| APIAuditLogChangeKeyEntityType
|
||||
| APIAuditLogChangeKeyStatus
|
||||
| APIAuditLogChangeKeyLocation;
|
||||
| APIAuditLogChangeKeyLocation
|
||||
| APIAuditLogChangeKeyCommunicationDisabledUntil;
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
@@ -644,6 +645,11 @@ export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildSched
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { APIUser } from './user.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
|
||||
export interface APIGuildScheduledEvent {
|
||||
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
/**
|
||||
* The id of the guild event
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The type of hosting entity associated with the scheduled event
|
||||
*/
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
entity_type: Type;
|
||||
/**
|
||||
* The id of the hosting entity associated with the scheduled event
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The entity metadata for the scheduled event
|
||||
*/
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata;
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The user that created the scheduled event
|
||||
*/
|
||||
@@ -65,6 +65,31 @@ export interface APIGuildScheduledEvent {
|
||||
user_count?: number;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
|
||||
*/
|
||||
export type APIGuildScheduledEvent =
|
||||
| APIStageInstanceGuildScheduledEvent
|
||||
| APIVoiceGuildScheduledEvent
|
||||
| APIExternalGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
} from './_chatInput/string.ts';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOptionBase,
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer.ts';
|
||||
import type {
|
||||
@@ -38,7 +38,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
} from './_chatInput/mentionable.ts';
|
||||
import type {
|
||||
APIApplicationCommandNumberOptionBase,
|
||||
APIApplicationCommandNumberOption,
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
} from './_chatInput/number.ts';
|
||||
import type {
|
||||
@@ -67,13 +67,13 @@ export * from './_chatInput/shared.ts';
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandStringOption
|
||||
| APIApplicationCommandIntegerOptionBase
|
||||
| APIApplicationCommandIntegerOption
|
||||
| APIApplicationCommandBooleanOption
|
||||
| APIApplicationCommandUserOption
|
||||
| APIApplicationCommandChannelOption
|
||||
| APIApplicationCommandRoleOption
|
||||
| APIApplicationCommandMentionableOption
|
||||
| APIApplicationCommandNumberOptionBase;
|
||||
| APIApplicationCommandNumberOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
|
||||
@@ -97,6 +97,7 @@ export interface APIApplication {
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
*/
|
||||
export enum ApplicationFlags {
|
||||
EmbeddedReleased = 1 << 1,
|
||||
ManagedEmoji = 1 << 2,
|
||||
GroupDMCreate = 1 << 4,
|
||||
RPCHasConnected = 1 << 11,
|
||||
@@ -108,4 +109,5 @@ export enum ApplicationFlags {
|
||||
Embedded = 1 << 17,
|
||||
GatewayMessageContent = 1 << 18,
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
EmbeddedFirstParty = 1 << 20,
|
||||
}
|
||||
|
||||
@@ -336,7 +336,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
|
||||
| APIAuditLogChangeKeyEntityType
|
||||
| APIAuditLogChangeKeyStatus
|
||||
| APIAuditLogChangeKeyLocation;
|
||||
| APIAuditLogChangeKeyLocation
|
||||
| APIAuditLogChangeKeyCommunicationDisabledUntil;
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
@@ -683,6 +684,11 @@ export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildSched
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { APIUser } from './user.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
|
||||
export interface APIGuildScheduledEvent {
|
||||
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
/**
|
||||
* The id of the guild event
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The type of hosting entity associated with the scheduled event
|
||||
*/
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
entity_type: Type;
|
||||
/**
|
||||
* The id of the hosting entity associated with the scheduled event
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The entity metadata for the scheduled event
|
||||
*/
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata;
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The user that created the scheduled event
|
||||
*/
|
||||
@@ -65,6 +65,31 @@ export interface APIGuildScheduledEvent {
|
||||
user_count?: number;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
|
||||
*/
|
||||
export type APIGuildScheduledEvent =
|
||||
| APIStageInstanceGuildScheduledEvent
|
||||
| APIVoiceGuildScheduledEvent
|
||||
| APIExternalGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
|
||||
*/
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.26.0",
|
||||
"version": "0.26.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "discord-api-types",
|
||||
"version": "0.26.0",
|
||||
"version": "0.26.1",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.16.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.26.0",
|
||||
"version": "0.26.1",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"types": "./v9.d.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
} from './_chatInput/string';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOptionBase,
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer';
|
||||
import type {
|
||||
@@ -38,7 +38,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
} from './_chatInput/mentionable';
|
||||
import type {
|
||||
APIApplicationCommandNumberOptionBase,
|
||||
APIApplicationCommandNumberOption,
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
} from './_chatInput/number';
|
||||
import type {
|
||||
@@ -67,13 +67,13 @@ export * from './_chatInput/shared';
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandStringOption
|
||||
| APIApplicationCommandIntegerOptionBase
|
||||
| APIApplicationCommandIntegerOption
|
||||
| APIApplicationCommandBooleanOption
|
||||
| APIApplicationCommandUserOption
|
||||
| APIApplicationCommandChannelOption
|
||||
| APIApplicationCommandRoleOption
|
||||
| APIApplicationCommandMentionableOption
|
||||
| APIApplicationCommandNumberOptionBase;
|
||||
| APIApplicationCommandNumberOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
|
||||
@@ -97,6 +97,7 @@ export interface APIApplication {
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
*/
|
||||
export const enum ApplicationFlags {
|
||||
EmbeddedReleased = 1 << 1,
|
||||
ManagedEmoji = 1 << 2,
|
||||
GroupDMCreate = 1 << 4,
|
||||
RPCHasConnected = 1 << 11,
|
||||
@@ -108,4 +109,5 @@ export const enum ApplicationFlags {
|
||||
Embedded = 1 << 17,
|
||||
GatewayMessageContent = 1 << 18,
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
EmbeddedFirstParty = 1 << 20,
|
||||
}
|
||||
|
||||
@@ -320,7 +320,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyGuildId
|
||||
| APIAuditLogChangeKeyEntityType
|
||||
| APIAuditLogChangeKeyStatus
|
||||
| APIAuditLogChangeKeyLocation;
|
||||
| APIAuditLogChangeKeyLocation
|
||||
| APIAuditLogChangeKeyCommunicationDisabledUntil;
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
@@ -644,6 +645,11 @@ export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildSched
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { APIUser } from './user';
|
||||
import type { APIGuildMember } from './guild';
|
||||
import type { Snowflake } from '../../globals';
|
||||
|
||||
export interface APIGuildScheduledEvent {
|
||||
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
/**
|
||||
* The id of the guild event
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The type of hosting entity associated with the scheduled event
|
||||
*/
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
entity_type: Type;
|
||||
/**
|
||||
* The id of the hosting entity associated with the scheduled event
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The entity metadata for the scheduled event
|
||||
*/
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata;
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The user that created the scheduled event
|
||||
*/
|
||||
@@ -65,6 +65,31 @@ export interface APIGuildScheduledEvent {
|
||||
user_count?: number;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
|
||||
*/
|
||||
export type APIGuildScheduledEvent =
|
||||
| APIStageInstanceGuildScheduledEvent
|
||||
| APIVoiceGuildScheduledEvent
|
||||
| APIExternalGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
} from './_chatInput/string';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOptionBase,
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer';
|
||||
import type {
|
||||
@@ -38,7 +38,7 @@ import type {
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
} from './_chatInput/mentionable';
|
||||
import type {
|
||||
APIApplicationCommandNumberOptionBase,
|
||||
APIApplicationCommandNumberOption,
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
} from './_chatInput/number';
|
||||
import type {
|
||||
@@ -67,13 +67,13 @@ export * from './_chatInput/shared';
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandStringOption
|
||||
| APIApplicationCommandIntegerOptionBase
|
||||
| APIApplicationCommandIntegerOption
|
||||
| APIApplicationCommandBooleanOption
|
||||
| APIApplicationCommandUserOption
|
||||
| APIApplicationCommandChannelOption
|
||||
| APIApplicationCommandRoleOption
|
||||
| APIApplicationCommandMentionableOption
|
||||
| APIApplicationCommandNumberOptionBase;
|
||||
| APIApplicationCommandNumberOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
|
||||
@@ -97,6 +97,7 @@ export interface APIApplication {
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
*/
|
||||
export const enum ApplicationFlags {
|
||||
EmbeddedReleased = 1 << 1,
|
||||
ManagedEmoji = 1 << 2,
|
||||
GroupDMCreate = 1 << 4,
|
||||
RPCHasConnected = 1 << 11,
|
||||
@@ -108,4 +109,5 @@ export const enum ApplicationFlags {
|
||||
Embedded = 1 << 17,
|
||||
GatewayMessageContent = 1 << 18,
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
EmbeddedFirstParty = 1 << 20,
|
||||
}
|
||||
|
||||
@@ -336,7 +336,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
|
||||
| APIAuditLogChangeKeyEntityType
|
||||
| APIAuditLogChangeKeyStatus
|
||||
| APIAuditLogChangeKeyLocation;
|
||||
| APIAuditLogChangeKeyLocation
|
||||
| APIAuditLogChangeKeyCommunicationDisabledUntil;
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
@@ -683,6 +684,11 @@ export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildSched
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { APIUser } from './user';
|
||||
import type { APIGuildMember } from './guild';
|
||||
import type { Snowflake } from '../../globals';
|
||||
|
||||
export interface APIGuildScheduledEvent {
|
||||
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
/**
|
||||
* The id of the guild event
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The type of hosting entity associated with the scheduled event
|
||||
*/
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
entity_type: Type;
|
||||
/**
|
||||
* The id of the hosting entity associated with the scheduled event
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ export interface APIGuildScheduledEvent {
|
||||
/**
|
||||
* The entity metadata for the scheduled event
|
||||
*/
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata;
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The user that created the scheduled event
|
||||
*/
|
||||
@@ -65,6 +65,31 @@ export interface APIGuildScheduledEvent {
|
||||
user_count?: number;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
|
||||
*/
|
||||
export type APIGuildScheduledEvent =
|
||||
| APIStageInstanceGuildScheduledEvent
|
||||
| APIVoiceGuildScheduledEvent
|
||||
| APIExternalGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user