mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 11:20:10 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0443a02ec | ||
|
|
cb92843991 | ||
|
|
d06d2d6a9a | ||
|
|
854aa3691c | ||
|
|
e5710d0e42 | ||
|
|
9a578489ad | ||
|
|
10fdeaa68d | ||
|
|
fddff2167c | ||
|
|
e8127b89f8 | ||
|
|
ab2598441a |
27
CHANGELOG.md
27
CHANGELOG.md
@@ -1,3 +1,30 @@
|
||||
# [0.29.0](https://github.com/discordjs/discord-api-types/compare/0.28.0...0.29.0) (2022-03-10)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **GatewayVoiceState:** some fields are optional instead of nullable ([#345](https://github.com/discordjs/discord-api-types/issues/345)) ([fddff21](https://github.com/discordjs/discord-api-types/commit/fddff2167c858832d6c61f3efca8d944fd356a85))
|
||||
- **RESTJSONErrorCodes:** typo in error `30046` ([#362](https://github.com/discordjs/discord-api-types/issues/362)) ([854aa36](https://github.com/discordjs/discord-api-types/commit/854aa3691c4d16a2c7fec7421cf25ea03a030e55))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **APIGuildScheduledEventBase:** make `description` nullable ([#359](https://github.com/discordjs/discord-api-types/issues/359)) ([e5710d0](https://github.com/discordjs/discord-api-types/commit/e5710d0e42d4f597bc9ed5594619a5032bf59bcb))
|
||||
- make things optional and nullable where applicable ([#361](https://github.com/discordjs/discord-api-types/issues/361)) ([10fdeaa](https://github.com/discordjs/discord-api-types/commit/10fdeaa68df9b3b61b20b8d90b9587d03d95a450))
|
||||
- **RESTJSONErrorCodes:** update error `50008` key ([#338](https://github.com/discordjs/discord-api-types/issues/338)) ([9a57848](https://github.com/discordjs/discord-api-types/commit/9a578489ad05b2ba8ed8d496db19cb86fa572ef7))
|
||||
|
||||
### Features
|
||||
|
||||
- **APIInviteGuild:** add boost count ([#323](https://github.com/discordjs/discord-api-types/issues/323)) ([cb92843](https://github.com/discordjs/discord-api-types/commit/cb92843991307d59c61d017d8ab1adcd469b4512))
|
||||
- **APIStageInstance:** add `guild_scheduled_event_id` ([#350](https://github.com/discordjs/discord-api-types/issues/350)) ([d06d2d6](https://github.com/discordjs/discord-api-types/commit/d06d2d6a9a8ccc84337b2ce9c59430694ae93e8a))
|
||||
- **RESTJSONErrorCodes:** add error `10065` ([#336](https://github.com/discordjs/discord-api-types/issues/336)) ([e8127b8](https://github.com/discordjs/discord-api-types/commit/e8127b89f89c4612fab0d3702ce512e41ab75b6e))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **RESTJSONErrorCodes:** `MaximumNumberOfEditsToMessagesOlderThanOneHourReached` is no longer mistyped as `MaxmimumNumberOfEditsToMessagesOlderThanOneHourReached`
|
||||
- **APIGuildScheduledEventBase:** The type for `description` can also be null, not just optional
|
||||
- **RESTJSONErrorCodes:** The error code `50008` has been renamed from `CannotSendMessagesInVoiceChannel` to `CannotSendMessagesInNonTextChannel`
|
||||
- The deprecated `asset` field for stickers is correctly marked as optional now. The `image` field for Guild Scheduled Events is now correctly typed as optional.
|
||||
- **GatewayVoiceState:** `channel_id` and `request_to_speak_timestamp` are correctly typed as optional, not nullable now.
|
||||
|
||||
# [0.28.0](https://github.com/discordjs/discord-api-types/compare/0.27.3...0.28.0) (2022-03-07)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
# [0.29.0](https://github.com/discordjs/discord-api-types/compare/0.28.0...0.29.0) (2022-03-10)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **GatewayVoiceState:** some fields are optional instead of nullable ([#345](https://github.com/discordjs/discord-api-types/issues/345)) ([fddff21](https://github.com/discordjs/discord-api-types/commit/fddff2167c858832d6c61f3efca8d944fd356a85))
|
||||
- **RESTJSONErrorCodes:** typo in error `30046` ([#362](https://github.com/discordjs/discord-api-types/issues/362)) ([854aa36](https://github.com/discordjs/discord-api-types/commit/854aa3691c4d16a2c7fec7421cf25ea03a030e55))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **APIGuildScheduledEventBase:** make `description` nullable ([#359](https://github.com/discordjs/discord-api-types/issues/359)) ([e5710d0](https://github.com/discordjs/discord-api-types/commit/e5710d0e42d4f597bc9ed5594619a5032bf59bcb))
|
||||
- make things optional and nullable where applicable ([#361](https://github.com/discordjs/discord-api-types/issues/361)) ([10fdeaa](https://github.com/discordjs/discord-api-types/commit/10fdeaa68df9b3b61b20b8d90b9587d03d95a450))
|
||||
- **RESTJSONErrorCodes:** update error `50008` key ([#338](https://github.com/discordjs/discord-api-types/issues/338)) ([9a57848](https://github.com/discordjs/discord-api-types/commit/9a578489ad05b2ba8ed8d496db19cb86fa572ef7))
|
||||
|
||||
### Features
|
||||
|
||||
- **APIInviteGuild:** add boost count ([#323](https://github.com/discordjs/discord-api-types/issues/323)) ([cb92843](https://github.com/discordjs/discord-api-types/commit/cb92843991307d59c61d017d8ab1adcd469b4512))
|
||||
- **APIStageInstance:** add `guild_scheduled_event_id` ([#350](https://github.com/discordjs/discord-api-types/issues/350)) ([d06d2d6](https://github.com/discordjs/discord-api-types/commit/d06d2d6a9a8ccc84337b2ce9c59430694ae93e8a))
|
||||
- **RESTJSONErrorCodes:** add error `10065` ([#336](https://github.com/discordjs/discord-api-types/issues/336)) ([e8127b8](https://github.com/discordjs/discord-api-types/commit/e8127b89f89c4612fab0d3702ce512e41ab75b6e))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **RESTJSONErrorCodes:** `MaximumNumberOfEditsToMessagesOlderThanOneHourReached` is no longer mistyped as `MaxmimumNumberOfEditsToMessagesOlderThanOneHourReached`
|
||||
- **APIGuildScheduledEventBase:** The type for `description` can also be null, not just optional
|
||||
- **RESTJSONErrorCodes:** The error code `50008` has been renamed from `CannotSendMessagesInVoiceChannel` to `CannotSendMessagesInNonTextChannel`
|
||||
- The deprecated `asset` field for stickers is correctly marked as optional now. The `image` field for Guild Scheduled Events is now correctly typed as optional.
|
||||
- **GatewayVoiceState:** `channel_id` and `request_to_speak_timestamp` are correctly typed as optional, not nullable now.
|
||||
|
||||
# [0.28.0](https://github.com/discordjs/discord-api-types/compare/0.27.3...0.28.0) (2022-03-07)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
@@ -1273,7 +1273,7 @@ export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.S
|
||||
*/
|
||||
options: APISelectMenuOption[];
|
||||
/**
|
||||
* Custom placeholder text if nothing is selected, max 100 characters
|
||||
* Custom placeholder text if nothing is selected, max 150 characters
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The description of the scheduled event
|
||||
*/
|
||||
description?: string;
|
||||
description?: string | null;
|
||||
/**
|
||||
* The time the scheduled event will start
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image: string | null;
|
||||
image?: string | null;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -4,11 +4,26 @@
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialChannel } from './channel.ts';
|
||||
import type { APIPartialGuild } from './guild.ts';
|
||||
import type { APIGuild } from './guild.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIInviteStageInstance } from './stageInstance.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
APIGuild,
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'splash'
|
||||
| 'banner'
|
||||
| 'icon'
|
||||
| 'vanity_url_code'
|
||||
| 'description'
|
||||
| 'features'
|
||||
| 'verification_level'
|
||||
| 'nsfw_level'
|
||||
| 'premium_subscription_count'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
*/
|
||||
@@ -22,7 +37,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
guild?: APIInviteGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
|
||||
@@ -32,6 +32,10 @@ export interface APIStageInstance {
|
||||
* @deprecated
|
||||
*/
|
||||
discoverable_disabled: boolean;
|
||||
/**
|
||||
* The id of the scheduled event for this stage instance
|
||||
*/
|
||||
guild_scheduled_event_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface APISticker {
|
||||
* Previously the sticker asset hash, now an empty string
|
||||
* @deprecated
|
||||
*/
|
||||
asset: '';
|
||||
asset?: '';
|
||||
/**
|
||||
* Type of sticker
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
channel_id: Snowflake | null;
|
||||
channel_id?: Snowflake;
|
||||
/**
|
||||
* The user id this voice state is for
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The time at which the user requested to speak
|
||||
*/
|
||||
request_to_speak_timestamp: string | null;
|
||||
request_to_speak_timestamp?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,11 +4,26 @@
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialChannel } from './channel.ts';
|
||||
import type { APIPartialGuild } from './guild.ts';
|
||||
import type { APIGuild } from './guild.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIInviteStageInstance } from './stageInstance.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
APIGuild,
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'splash'
|
||||
| 'banner'
|
||||
| 'icon'
|
||||
| 'vanity_url_code'
|
||||
| 'description'
|
||||
| 'features'
|
||||
| 'verification_level'
|
||||
| 'nsfw_level'
|
||||
| 'premium_subscription_count'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
@@ -23,7 +38,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
guild?: APIInviteGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
|
||||
@@ -1273,7 +1273,7 @@ export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.S
|
||||
*/
|
||||
options: APISelectMenuOption[];
|
||||
/**
|
||||
* Custom placeholder text if nothing is selected, max 100 characters
|
||||
* Custom placeholder text if nothing is selected, max 150 characters
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The description of the scheduled event
|
||||
*/
|
||||
description?: string;
|
||||
description?: string | null;
|
||||
/**
|
||||
* The time the scheduled event will start
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image: string | null;
|
||||
image?: string | null;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -4,11 +4,26 @@
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialChannel } from './channel.ts';
|
||||
import type { APIPartialGuild } from './guild.ts';
|
||||
import type { APIGuild } from './guild.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIInviteStageInstance } from './stageInstance.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
APIGuild,
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'splash'
|
||||
| 'banner'
|
||||
| 'icon'
|
||||
| 'vanity_url_code'
|
||||
| 'description'
|
||||
| 'features'
|
||||
| 'verification_level'
|
||||
| 'nsfw_level'
|
||||
| 'premium_subscription_count'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
*/
|
||||
@@ -22,7 +37,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
guild?: APIInviteGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
|
||||
@@ -32,6 +32,10 @@ export interface APIStageInstance {
|
||||
* @deprecated
|
||||
*/
|
||||
discoverable_disabled: boolean;
|
||||
/**
|
||||
* The id of the scheduled event for this stage instance
|
||||
*/
|
||||
guild_scheduled_event_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface APISticker {
|
||||
* Previously the sticker asset hash, now an empty string
|
||||
* @deprecated
|
||||
*/
|
||||
asset: '';
|
||||
asset?: '';
|
||||
/**
|
||||
* Type of sticker
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
channel_id: Snowflake | null;
|
||||
channel_id?: Snowflake;
|
||||
/**
|
||||
* The user id this voice state is for
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The time at which the user requested to speak
|
||||
*/
|
||||
request_to_speak_timestamp: string | null;
|
||||
request_to_speak_timestamp?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,7 +47,8 @@ export enum RESTJSONErrorCodes {
|
||||
UnknownInteraction = 10062,
|
||||
UnknownApplicationCommand,
|
||||
|
||||
UnknownApplicationCommandPermissions = 10066,
|
||||
UnknownVoiceState = 10065,
|
||||
UnknownApplicationCommandPermissions,
|
||||
UnknownStageInstance,
|
||||
UnknownGuildMemberVerificationForm,
|
||||
UnknownGuildWelcomeScreen,
|
||||
@@ -109,7 +110,7 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042,
|
||||
|
||||
MaxmimumNumberOfEditsToMessagesOlderThanOneHourReached = 30046,
|
||||
MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046,
|
||||
|
||||
Unauthorized = 40001,
|
||||
VerifyYourAccount,
|
||||
@@ -133,7 +134,7 @@ export enum RESTJSONErrorCodes {
|
||||
CannotEditMessageAuthoredByAnotherUser,
|
||||
CannotSendAnEmptyMessage,
|
||||
CannotSendMessagesToThisUser,
|
||||
CannotSendMessagesInVoiceChannel,
|
||||
CannotSendMessagesInNonTextChannel,
|
||||
ChannelVerificationLevelTooHighForYouToGainAccess,
|
||||
OAuth2ApplicationDoesNotHaveBot,
|
||||
OAuth2ApplicationLimitReached,
|
||||
|
||||
@@ -95,6 +95,14 @@ export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIG
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null;
|
||||
}>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,6 +95,14 @@ export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIG
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null;
|
||||
}>;
|
||||
|
||||
/**
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.28.0",
|
||||
"version": "0.29.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "discord-api-types",
|
||||
"version": "0.28.0",
|
||||
"version": "0.29.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^16.1.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.28.0",
|
||||
"version": "0.29.0",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"exports": {
|
||||
"./globals": {
|
||||
|
||||
@@ -1273,7 +1273,7 @@ export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.S
|
||||
*/
|
||||
options: APISelectMenuOption[];
|
||||
/**
|
||||
* Custom placeholder text if nothing is selected, max 100 characters
|
||||
* Custom placeholder text if nothing is selected, max 150 characters
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The description of the scheduled event
|
||||
*/
|
||||
description?: string;
|
||||
description?: string | null;
|
||||
/**
|
||||
* The time the scheduled event will start
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image: string | null;
|
||||
image?: string | null;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -4,11 +4,26 @@
|
||||
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialChannel } from './channel';
|
||||
import type { APIPartialGuild } from './guild';
|
||||
import type { APIGuild } from './guild';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent';
|
||||
import type { APIInviteStageInstance } from './stageInstance';
|
||||
import type { APIUser } from './user';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
APIGuild,
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'splash'
|
||||
| 'banner'
|
||||
| 'icon'
|
||||
| 'vanity_url_code'
|
||||
| 'description'
|
||||
| 'features'
|
||||
| 'verification_level'
|
||||
| 'nsfw_level'
|
||||
| 'premium_subscription_count'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
*/
|
||||
@@ -22,7 +37,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
guild?: APIInviteGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
|
||||
@@ -32,6 +32,10 @@ export interface APIStageInstance {
|
||||
* @deprecated
|
||||
*/
|
||||
discoverable_disabled: boolean;
|
||||
/**
|
||||
* The id of the scheduled event for this stage instance
|
||||
*/
|
||||
guild_scheduled_event_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface APISticker {
|
||||
* Previously the sticker asset hash, now an empty string
|
||||
* @deprecated
|
||||
*/
|
||||
asset: '';
|
||||
asset?: '';
|
||||
/**
|
||||
* Type of sticker
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
channel_id: Snowflake | null;
|
||||
channel_id?: Snowflake;
|
||||
/**
|
||||
* The user id this voice state is for
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The time at which the user requested to speak
|
||||
*/
|
||||
request_to_speak_timestamp: string | null;
|
||||
request_to_speak_timestamp?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,11 +4,26 @@
|
||||
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialChannel } from './channel';
|
||||
import type { APIPartialGuild } from './guild';
|
||||
import type { APIGuild } from './guild';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent';
|
||||
import type { APIInviteStageInstance } from './stageInstance';
|
||||
import type { APIUser } from './user';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
APIGuild,
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'splash'
|
||||
| 'banner'
|
||||
| 'icon'
|
||||
| 'vanity_url_code'
|
||||
| 'description'
|
||||
| 'features'
|
||||
| 'verification_level'
|
||||
| 'nsfw_level'
|
||||
| 'premium_subscription_count'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
@@ -23,7 +38,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
guild?: APIInviteGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
|
||||
@@ -1273,7 +1273,7 @@ export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.S
|
||||
*/
|
||||
options: APISelectMenuOption[];
|
||||
/**
|
||||
* Custom placeholder text if nothing is selected, max 100 characters
|
||||
* Custom placeholder text if nothing is selected, max 150 characters
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The description of the scheduled event
|
||||
*/
|
||||
description?: string;
|
||||
description?: string | null;
|
||||
/**
|
||||
* The time the scheduled event will start
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
/**
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image: string | null;
|
||||
image?: string | null;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -4,11 +4,26 @@
|
||||
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialChannel } from './channel';
|
||||
import type { APIPartialGuild } from './guild';
|
||||
import type { APIGuild } from './guild';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent';
|
||||
import type { APIInviteStageInstance } from './stageInstance';
|
||||
import type { APIUser } from './user';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
APIGuild,
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'splash'
|
||||
| 'banner'
|
||||
| 'icon'
|
||||
| 'vanity_url_code'
|
||||
| 'description'
|
||||
| 'features'
|
||||
| 'verification_level'
|
||||
| 'nsfw_level'
|
||||
| 'premium_subscription_count'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
*/
|
||||
@@ -22,7 +37,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
guild?: APIInviteGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
|
||||
@@ -32,6 +32,10 @@ export interface APIStageInstance {
|
||||
* @deprecated
|
||||
*/
|
||||
discoverable_disabled: boolean;
|
||||
/**
|
||||
* The id of the scheduled event for this stage instance
|
||||
*/
|
||||
guild_scheduled_event_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface APISticker {
|
||||
* Previously the sticker asset hash, now an empty string
|
||||
* @deprecated
|
||||
*/
|
||||
asset: '';
|
||||
asset?: '';
|
||||
/**
|
||||
* Type of sticker
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
channel_id: Snowflake | null;
|
||||
channel_id?: Snowflake;
|
||||
/**
|
||||
* The user id this voice state is for
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The time at which the user requested to speak
|
||||
*/
|
||||
request_to_speak_timestamp: string | null;
|
||||
request_to_speak_timestamp?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,7 +47,8 @@ export enum RESTJSONErrorCodes {
|
||||
UnknownInteraction = 10062,
|
||||
UnknownApplicationCommand,
|
||||
|
||||
UnknownApplicationCommandPermissions = 10066,
|
||||
UnknownVoiceState = 10065,
|
||||
UnknownApplicationCommandPermissions,
|
||||
UnknownStageInstance,
|
||||
UnknownGuildMemberVerificationForm,
|
||||
UnknownGuildWelcomeScreen,
|
||||
@@ -109,7 +110,7 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042,
|
||||
|
||||
MaxmimumNumberOfEditsToMessagesOlderThanOneHourReached = 30046,
|
||||
MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046,
|
||||
|
||||
Unauthorized = 40001,
|
||||
VerifyYourAccount,
|
||||
@@ -133,7 +134,7 @@ export enum RESTJSONErrorCodes {
|
||||
CannotEditMessageAuthoredByAnotherUser,
|
||||
CannotSendAnEmptyMessage,
|
||||
CannotSendMessagesToThisUser,
|
||||
CannotSendMessagesInVoiceChannel,
|
||||
CannotSendMessagesInNonTextChannel,
|
||||
ChannelVerificationLevelTooHighForYouToGainAccess,
|
||||
OAuth2ApplicationDoesNotHaveBot,
|
||||
OAuth2ApplicationLimitReached,
|
||||
|
||||
@@ -95,6 +95,14 @@ export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIG
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null;
|
||||
}>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,6 +95,14 @@ export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIG
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null;
|
||||
}>;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user