0.24.0 (2021-10-16)
Bug Fixes
Code Refactoring
Features
- APIApplicationCommand: add
channel_types
field to channel options (#198) (77396b5) - APIAttachment: add ephemeral field (#199) (2aee879)
- APIGuildMember: add per guild avatars (#208) (0331518)
- APIRole: add role icons (#204) (1076822)
- InteractionResolvedChannels: add
parent_id
andthread_metadata
fields to resolved channels (#210) (64e4e52) - PermissionFlagBits: update thread permissions (#181) (68d97ae)
- PermissionFlagsBits: add
StartEmbeddedActivities
(#197) (4bbe1ea) - RESTJSONErrorCodes: add error 50101 (#202) (b453d75)
- Routes: add missing OAuth2 routes (#218) (9dd3446)
BREAKING CHANGES
- APIVoiceRegion: The
vip
property has been removed.
0.23.1 (2021-09-08)
Bug Fixes
0.23.0 (2021-09-07)
Bug Fixes
- AuditLog: correct
nickname
type (#189) (64937e2) - Embed: correct certain optional types as being required (#192) (e628f0f)
- import causing error 404 on deno (#178) (8fcd0f2)
chore
Features
- APIApplicationCommand: add
version
field (#193) (ecbed18) - APIUser: add
banner
andaccent_color
(#183) (b07b903) - Interactions: context menu items (#166) (fdc1c1a)
- JSONErrorCodes: add
160002
(#190) (8b49887) - MessageType: add ContextMenuCommand and rename ApplicationCommand to ChatInputCommand (#180) (0024823)
- Threads: add
invitable
(#185) (b6babf2)
BREAKING CHANGES
- Gateway: The three Application Command events have been removed
- Embed:
APIEmbedAuthor#name
is required, not optionalAPIEmbedThumbnail#url
is required, not optionalAPIEmbedImage#url
is required, not optional
0.22.0 (2021-07-31)
Bug Fixes
- Gateway: thread list sync now sends an array as documented (#174) (a93235c)
- MessageComponent: correct type for emoji (#176) (b75b05f)
chore
Features
BREAKING CHANGES
- ApplicationCommandOptionType: This renames
SubCommand
toSubcommand
, andSubCommandGroup
toSubcommandGroup
Routes#channelJoinedArchivedThreads
is now spelled right (fromRoutes#channelJoinedArhivedThreads
)- Gateway:
GatewayThreadListSync#members
is now an array of APIThreadMember instead of a Record of GatewayThreadListSyncMember
0.21.0 (2021-07-30)
Bug Fixes
- change resolved index types to string (#169) (d338409)
- export APIPingInteraction (#168) (ef2a0ae)
- APIInteraction: bring back Ping type (#164) (ff75eb3)
Features
- ApplicationCommandOptionType: add Number (10) (#153) (6f15e53)
- Globals: revert template bigint type to string type (#171) (f299507)
Reverts
BREAKING CHANGES
- Globals: The type for Snowflake and Permissions is reverted from the
${bigint}
template type back to a normal string type
0.20.2 (2021-07-21)
Bug Fixes
0.20.1 (2021-07-20)
Features
0.20.0 (2021-07-20)
chore
Code Refactoring
Features
- PermissionFlagsBits: add
UseExternalStickers
(1n << 37n) (#154) (5dccc6b) - RESTJSONErrorCodes: add sticker errors (#155) (8dbeca0)
BREAKING CHANGES
GatewayGuildMemberUpdateDispatchData#joined_at
is properly marked as nullable now- In v9,
thread_id
was incorrectly placed inRESTPostAPIWebhookWithTokenJSONBody
and has been moved toRESTPostAPIWebhookWithTokenQuery
- All types that contained the
ID
word in them have had it renamed toId
(ex:APIButtonComponentWithCustomID
is nowAPIButtonComponentWithCustomId
) - The
isStyledButton
util has been renamed toisInteractionButton
0.19.0 (2021-07-19)
Bug Fixes
- FormattingPatterns: fix StyledTimestamp (#147) (dd12c6a)
- RESTOAuth2: correct casing of
OAuth
(#134) (f0b2766) - RESTPostAPIWebhookWithTokenJSONBody: add missing components (#152) (ca933ae)
- fix autopublish CD (#140) (8627c9d)
chore
Code Refactoring
Features
- Stickers: sticker packs, sticker routes, and guild stickers (#145) (4a83629)
- add stage instance related typings to audit logs (#151) (836e8fb)
- APIGuild: add
nsfw_level
(#149) (5256ac7) - Channel: add embeds to post / patch (#143) (13d483e)
- FormattingPatterns: add timestamp (#146) (16eae7e)
- RESTErrors: add types for rest errors (#122) (7b47fc9)
- Threads: add typed thread creation (#148) (f393ba5)
- add typings for stage instance (#144) (e36ef9e)
- Interactions: components and component interactions (#132) (036bb03)
- Threads: add default auto archive and minor tweaks (#142) (d2b6276)
- api v9 and threads (#133) (d1498c3)
BREAKING CHANGES
APISelectOption
has been renamed toAPISelectMenuOption
APISelectMenuOption#default is now properly marked as optional
Updated OAuth2 Application types
APIApplication#owner
is now marked as optional, per the docsCorrect APIAuditLogChangeKeyNick’s key
This renames APIAuditLogChangeKeyNick’s key from
mute
tonick
Add
application_id
to APIMessageCorrect type of
id
anduser_id
in APIThreadMemberThe type of
id
anduser_id
in APIThreadMember are now marked as optional; read the TSDoc for when it’s actually optionalCorrectly version API route in RouteBases
This changes the
RouteBases.api
to be versioned based on the API version you’re importing. Make sure to update your code to handle thatAdded new guild features ref: https://github.com/discordjs/discord-api-types/pull/156/commits/4d36e533cffecbcce13e968a7803e5a68e021106
Cleaned up interaction types
While this shouldn’t be necessary, this is a warning that types for interactions HAVE changed and you may need to update your code. For the most part, the types should be the same, more accurate and strictly typed. You will also see that every type of interaction has a Guild/DM counterpart exported (ex: APIApplicationCommandGuildInteraction vs APIApplicationCommandInteraction, where the former has all the guild properties, while the latter has all properties that depend on context marked as optional).
Add message property to MessageComponent interactions
RESTErrorCodes: This properly capitalizes certain error codes with the right OAuth capitalization
RESTOAuth2:
RESTGetAPIOauth2CurrentApplicationResult
andRESTGetAPIOauth2CurrentAuthorizationResult
have been renamed toRESTGetAPIOAuth2CurrentApplicationResult
andRESTGetAPIOAuth2CurrentAuthorizationResult
, to correct the casing ofOAuth
Enums: Enum keys have been normalized, and they are all PascalCased now (for API v8 and above). API v6 did not receive these changes.
0.18.1 (2021-05-03)
Bug Fixes
Features
- add new interfaces for interaction-related structures (#129) (bd638b9)
- APIInvite: add
expires_at
field andwith_expiration
param (#127) (82ca0ce) - ApplicationCommandOptionType: add
MENTIONABLE
(9) (#126) (91afb0b)
0.18.0 (2021-04-18)
Bug Fixes
Code Refactoring
BREAKING CHANGES
- Invite:
InviteTargetUserType
is renamed toInviteTargetType
, to match the documentation.
0.17.0 (2021-04-17)
Bug Fixes
Code Refactoring
Features
BREAKING CHANGES
- APISticker: This removes the
preview_asset
property from sticket objects - APIChannel: This corrects the fact that
rtc_region
isn’t present on non-voice-like channels
0.16.0 (2021-04-14)
Features
- Guild: add
nsfw
property (#116) (21b572b) - RESTJSONErrorCode: add
UnknownInteraction
error code (#115) (ced37d0)
docs
BREAKING CHANGES
- Routes: possibly a breaking change due to the fact that the messageID is now strictly typed as a Snowflake or
@me
- Reference: discord/discord-api-docs#2410
0.15.1 (2021-04-12)
Bug Fixes
- TypeScript: imports not working in TypeScript (4738c33)
0.15.0 (2021-04-11)
Bug Fixes
- APIApplicationCommand: default_permission (#111) (9420c3e)
- Scripts:
await
inversions
script, log any errors from deno one (9113eb1)
BREAKING CHANGES
- APIApplicationCommand: This renames the
default_permissions
property todefault_permission
, the correct spelling.
0.14.0 (2021-04-11)
Bug Fixes
- APIMessage: correct type for
application
(ed2cbe8) - GatewayGuildMemberUpdateDispatchData: correct types (14f14e2)
- GatewayPresenceUpdateData:
activities
may not benull
(bb3cb04) - GatewayVoiceServerUpdateDispatchData:
endpoint
is nullable (e8203a1) - GuildWelcomeScreenChannel: document missing
description
property (238695b) - OAuth2:
scope
can be optional / not required (bbe56a9) - OAuth2: remove invalid parameters from refresh token request (1c02450)
- RPC: version
RPC
same asrest
, export again inshortcuts
(67e0ba1) - Utils: correct import for deno users (42dd75f)
chore
- Gateway: remove
guild_subscriptions
(ab8b289) - GatewayReady: un-document
private_channels
(457edf4) - Integrations: remove routes that bots can no longer interact with (577c5bd)
- MessageGetReactions: remove
before
pagination (0ec26b7) - Oauth2Scopes: remove
rpc.api
(7ee8511) - Permissions: rename
USE_APPLICATION_COMMANDS
toUSE_SLASH_COMMANDS
(2aa7f7a) - UserFlags: un-document
SYSTEM
flag (1774d4c)
Code Refactoring
- restructure module (81cdfc2)
Features
- APIApplication: document
terms_of_service
andprivacy_policy
(598cbfb) - APIAttachment: add
content_type
(2d432d1) - APIChannel: add
rtc_region
(#108) (07ba907) - APIChannel: add
video_quality_mode
(#106) (d8d7bcc) - APIInteraction: add type-check utilities (3307201)
- Exports: add
globals
to the exported sub-modules (5d35f61) - Gateway: add
INTEGRATION_*
events (9c3fab0) - GuildWelcomeScreen: document
welcome-screen
endpoint (169ecde) - Interactions: add batch command create / update (edfe70a)
- Interactions: add Slash Command Permissions (f517f35)
- Invites: document
target_application
& correct property names (97c8ab3) - MessageFlags:
EPHEMERAL
desc and addedLOADING
(#109) (4462255) - PatchAPIWebhookMessage: add
file
property (fc2f3c5) - Webhook: add & document
url
property (77e5bb6) - invite reminder system message type and flag (#105) (b90714f)
- stage channels! (#107) (6cd7542)
BREAKING CHANGES
- APIInteraction: This commit removes the
guild_id
property fromAPIDMInteraction
which allows type-checks to work with thein
operator. Because of that, we also provide utility functions that help with those type checks. Use them in your code by importing theUtils
object, or by directly importing them. Check the README for examples - OAuth2: This commit removes parameters that are not expected in the refresh token request body
Reference: https://github.com/discord/discord-api-docs/commit/eaa12cbc8f96cf7cfe8c530f88e60582c24ca5dd
- GatewayReady: This property has been deprecated for a while, and was returning an empty array for bot users. This commit removes it entirely
Reference: https://github.com/discord/discord-api-docs/commit/f36156dbb641f5c4d4f4593f345bfd6e27fdee08
- Permissions: This commit brings consistency with the documentation,
where the permission is documented as
USE_SLASH_COMMANDS
, whereas the client has it asUSE_APPLICATION_COMMANDS
internally
Reference: https://github.com/discord/discord-api-docs/commit/c7d25885c5cd80a49b31609a40b70603b35f9dec
- MessageGetReactions: This query parameter is not usable and was not respected by the API.
Reference: https://github.com/discord/discord-api-docs/commit/f72b084773d4d3989fb19be4fb4d9cf276a1e6b3
- OAuth2: This removes the
scope
property from the authorization code flow, as it is not expected there.
Reference: https://github.com/discord/discord-api-docs/commit/57965033ab4216a0bb853e85d6912531cd5a9981
- Gateway: This removes
guild_subscriptions
, as it has been deprecated in favor ofintents
.
Reference: https://github.com/discord/discord-api-docs/commit/8de017436d37e56fab14cb8f68f0448a45ebc731
- Oauth2Scopes: This removes the
rpc.api
scope, as it has been removed from the documentation.
Reference: https://github.com/discord/discord-api-docs/commit/2641d9808f676e7316483d152cdb37ed1168f968
- APIMessage: This removes the
APIMessageApplication
interface, as it has been removed from the documentation, being replaced with the OAuth2 application.
Reference: https://github.com/discord/discord-api-docs/commit/ff0c831e424f1bc17dd3cde62da48d5c3d933e88
- APIApplication: This renames the
GatewayPresenceLimit
flag toGatewayPresenceLimited
, for consistency withGatewayGuildMembersLimited
and the documented name.
Reference: https://github.com/discord/discord-api-docs/commit/39b254bed1cc396c475e508a3f2bf328815605c9
- GatewayVoiceServerUpdateDispatchData: Any code that expects
endpoint
to never be null needs to be updated, and the conditions specified in the documentation need to be respected regarding that.
Reference: https://github.com/discord/discord-api-docs/commit/e887382fafd4c4417f7ba62963984f25bcb643f6
- Invites: This renames
target_user_type
totarget_type
, the actual value the API expects.
Reference: https://github.com/discord/discord-api-docs/commit/1b4e363e324eb1f49a47e32cb0108fbe276c8e0e
- GatewayPresenceUpdateData: Clearing
activities
is done by setting them to an empty array, not by setting them tonull
.
Reference: https://github.com/discord/discord-api-docs/commit/5bf598b864fb89262fce07137f68ce6e7e583432
- UserFlags: This removes a flag that bots should not use, as Discord said this is an internal flag.
Reference: https://github.com/discord/discord-api-docs/commit/9293f0d490ac6acf9d627e429e5a8131b303b528
- Integrations: This removes the 3 routes that bots can no longer access.
Reference: https://github.com/discord/discord-api-docs/commit/efe4e5808b6826d40302e265a5ae9b5b65d92fe7
- Exports: Certain objects from this file have been moved to their appropriate spot (such as JSON Error Codes)
- Files have been moved around in order to keep them organized. Exports might also be missing, so please report if that is the case.
0.13.3 (2021-03-28)
0.13.2 (2021-03-28)
Bug Fixes
0.13.1 (2021-03-27)
Bug Fixes
0.13.0 (2021-03-27)
Bug Fixes
- deno: replace
const enum
exports in deno with normalenum
s (#89) (7343fab) - RESTPostAPIChannelMessageJSONBody: mark
tts
as a full boolean (#96) (9d8d090) - RESTPostAPIGuildsJSONBody: make some fields nullable (#91) (ae1900d)
Features
- APIApplication: add ApplicationFlags (#92) (92f76f1)
- APIApplicationCommandInteractionData: add
resolved
(#86) (24155ae) - APIBaseInteraction: add application_id (#98) (0582f88)
- APIInteraction: DM slash commands and property descriptions (#84) (d0b3106)
- APIInteractionResponse, APIInteractionResponseType: update for UI changes (#90) (eafe7ba)
- APIMessage: add
interaction
(#93) (0f29b32) - APIMessageReferenceSend: add
fail_if_not_exists
(#82) (855f36d) - PermissionFlagsBits: add
USE_APPLICATION_COMMANDS
(#85) (ceb787b) - rest: api base routes (#87) (466fa95)
- add Application Command events (#75) (da2c2e9)
- add GET single Application Command (#76) (5826da2)
- implement FormatPatterns (#79) (4e4a084)
- OAuth2: add
/oauth2/[@me](https://github.com/me)
route (#73) (84759d1) - Webhook: add Edit Webhook Message result and error 50027 (#71) (4c77a5d)
0.12.1 (2021-01-05)
Bug Fixes
Features
0.12.0 (2021-01-01)
Bug Fixes
- APIApplication: flags should be omitted in REST, not optional everywhere (#57) (664ad80)
- RESTPatchAPIChannelJSONBody: add missing bitrate field (#60) (15892ec)
Features
0.11.2 (2020-12-20)
0.11.1 (2020-12-19)
Bug Fixes
- APIAuditLogEntry: user_id is not nullable (#52) (2b89beb)
- RESTPostAPIGuildsJSONBody: system_channel_flags is optional (#53) (ba4c0d7)
0.11.0 (2020-12-19)
Bug Fixes
- APIGuildMember: drop nullability of
pending
prop (#49) (c2f0dee) - RESTPatchAPIGuildJSONBody: multiple properties are actually nullable (#48) (018fc4f)
0.10.0 (2020-12-09)
Features
0.9.1 (2020-11-22)
0.9.0 (2020-11-22)
Features
0.8.0 (2020-11-03)
Bug Fixes
- webhookPlatform route (#36) (666a0c7)
- GatewayPresence: correct type for sent activity objects (#30) (61db1ee)
0.7.0 (2020-10-18)
Bug Fixes
- GatewayHeartbeat: d is nullable (#26) (0982610)
- GatewayIdentify: use correct presence interface (#28) (91c63f0)
Features
0.6.0 (2020-10-04)
Bug Fixes
- APIChannel: position is optional (#21) (061a147)
- RESTPostAPIGuildsJSONBody: use correct types (#22) (dcf8ddf)
Features
0.5.0 (2020-09-19)
Bug Fixes
- correct typos (#18) (97c7b4e)
- APIUser: premium_type is optional (#19) (8cf1ba3)
- GatewayIdentifyProperties: rename
device
to$device
(#17) (9e5c5b5)
0.4.1 (2020-09-18)
Features
0.4.0 (2020-09-16)
Features
0.3.0 (2020-09-14)
Bug Fixes
0.2.0 (2020-09-10)
Bug Fixes
0.1.1 (2020-08-22)
Bug Fixes
- set target version to ES2020 (767a833)