Releases: discordjs/discord-api-types
0.14.0: feat(*): Polish Week - Discord API Types Edition (#110)
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: discord/discord-api-docs@eaa12cb
-
GatewayReady: This property has been deprecated for a while, and was
returning an empty array for bot users. This commit removes it entirely- Reference: discord/discord-api-docs@f36156d
-
Permissions: This commit brings consistency with the documentation,
where the permission is documented asUSE_SLASH_COMMANDS
, whereas the
client has it asUSE_APPLICATION_COMMANDS
internally- Reference: discord/discord-api-docs@c7d2588
-
MessageGetReactions: This query parameter is not usable and was not respected
by the API.- Reference: discord/discord-api-docs@f72b084
-
OAuth2: This removes the
scope
property from the authorization
code flow, as it is not expected there.- Reference: discord/discord-api-docs@5796503
-
Gateway: This removes
guild_subscriptions
, as it has been
deprecated in favor ofintents
.- Reference: discord/discord-api-docs@8de0174
-
Oauth2Scopes: This removes the
rpc.api
scope, as it has been removed
from the documentation.- Reference: discord/discord-api-docs@2641d98
-
APIMessage: This removes the
APIMessageApplication
interface, as it has
been removed from the documentation, being replaced with the OAuth2 application.- Reference: discord/discord-api-docs@ff0c831
-
APIApplication: This renames the
GatewayPresenceLimit
flag to
GatewayPresenceLimited
, for consistency withGatewayGuildMembersLimited
and the documented name.- Reference: discord/discord-api-docs@39b254b
-
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: discord/discord-api-docs@e887382
-
Invites: This renames
target_user_type
totarget_type
,
the actual value the API expects.- Reference: discord/discord-api-docs@1b4e363
-
GatewayPresenceUpdateData: Clearing
activities
is done by setting them to an empty
array, not by setting them tonull
.- Reference: discord/discord-api-docs@5bf598b
-
UserFlags: This removes a flag that bots should not use, as Discord
said this is an internal flag.- Reference: discord/discord-api-docs@9293f0d
-
Integrations: This removes the 3 routes that bots can no longer access.
- Reference: discord/discord-api-docs@efe4e58
-
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.
- Files have been moved around in order to keep them
0.13.3
0.13.2
0.13.1
0.13.0
Changes
- OAuth2: add
/oauth2/@me
route (84759d1) - Webhook: add Webhook message edit result, and invalid webhook token error (4c77a5d)
- ApplicationCommand:
- JSONErrorCodes: add unknown guild template error code (5826da2)
- FormattingPatterns: add regular expressions for common formatting patterns in messages (4e4a084, 3bf9738)
- APIMessageReferenceSend: add
fail_if_not_exists
property (855f36d) - AuditLog: add missing change keys (63096d8)
- RESTRoutes: add API bases (466fa95)
- RESTPostAPIGuildsJSONBody: correctly mark some fields as nullable (ae1900d)
- APIInteraction: ad DM slash commands (d0b3106)
- APIMessage: add
interaction
property (0f29b32) - APIApplication: document known ApplicationFlags (92f76f1)
- APIInteractionResponse, APIInteractionResponseType:
- APIApplicationCommandInteractionData: add
resolved
property (24155ae) - RESTPostAPIChannelMessageJSONBody: correctly type
tts
as a boolean (9d8d090) - APIBaseInteraction: add
application_id
property (0582f88) - APIApplicationCommandInteractionDataOption: add types to all options (ca61396)
- PermissionFlagsBits: add
USE_APPLICATION_COMMANDS
(ceb787b)
Miscellaneous
- GatewayHeartbeat: clarify that the
HEARTBEAT
op code is bidirectional (70bfe9f) - CI/CD and deno: update CI/CD workflow, and bring deno types up to date (ff76175)
- deno: replace all
const enum
withenum
(7343fab) - GitHub: add missing markdowns with instructions (eb3f8e1)
- deno: make git commit hooks also auto-build deno files (eb3f8e1)
chore: release 0.12.1 (#70)
chore(chores): All the chores! And release 0.12.0 (#62)
also known as the catching up with discord.js version
Changes
- APIInteraction: add
permissions
property to the returned member (70b427b) - APIActivity: add missing properties (dccdfe0)
- RESTPatchAPIChannelJSONBody: add missing
bitrate
property (15892ec) - APIApplication: flags should be omitted in REST, not optional everywhere (664ad80)
- APIAuditLogChangeKeyID: correct the fact that
new_value
is optional, not required (e947218) - APIAuditLogOptions: correctly mark the fact
type
is not always present (1191464) - 🎇 deno support: added official deno support. \o/ (6464fe9)
- 🎇 comments: added comments for every property there is (copy-paste from the docs site) (6464fe9)
0.11.2: chore: RESTPatchAPIGuildJSONBody `system_channel_flags` is optional; …
Changes
- RESTPatchAPIGuildJSONBody: correctly mark
system_channel_flags
as optional (c28ef6c)
0.11.1
0.11.0
Changes
⚠️ ChannelPinsDispatch: correct type oflast_pin_timestamp
to be nullable (8d77142)- APIGuildMember: add
pending
property (b832b24, c2f0dee) - RESTPatchAPIGuildJSONBody: mark certain properties as nullable (018fc4f)
- ✨ Interactions, Slash Commands, REST: added types for the new Slash Commands (91cf0d3)
- semi-
⚠️ : allenum
s have been converted intoconst enum
s (JS users won't see a difference, TS users will get the enum values inlined) - updated
devDependencies
- MessageFlags: document
EPHEMERAL
flag (91cf0d3#diff-81ed2132d7252019041cf21ae521708562445459d2783e6dfb259fa13e1fccbcR156) - APIInteraction, APIApplicationCommand, etc: added types for slash commands (91cf0d3#diff-fdad1ab2bad66a57e5aea1aaaa12d94b087157bde9dae2927125b274dafe6f6d)
⚠️ REST Routes: corrected names of the exported routes (91cf0d3#diff-8104c895d8c35ea72c5cb796db5e492fa800f1c2030076ac0a5cdeb576c627fa)- semi-
⚠️ channelMessageAllReactions
route: corrected route (91cf0d3#diff-8104c895d8c35ea72c5cb796db5e492fa800f1c2030076ac0a5cdeb576c627faR98) - REST Routes: document all application command routes; add docstrings for new webhook routes
- GatewayReadyDispatch: document added partial
APIApplication
object added with slash commands (5d0f885)
- semi-
- Gateway Types: export the
d
property of all payloads as separate types you may use (5d0f885) - Webhook: added webhook message route types (ec9002f)