npm discord-api-types 0.14.0

latest releases: 0.37.84, 0.37.84-next.c457b8d.1715776908, 0.37.84-next.7650ce4.1715776428...
3 years ago

0.14.0 (2021-04-11)

Bug Fixes

  • APIMessage: correct type for application (ed2cbe8)
  • GatewayGuildMemberUpdateDispatchData: correct types (14f14e2)
  • GatewayPresenceUpdateData: activities may not be null (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 as rest, export again in shortcuts (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 to USE_SLASH_COMMANDS (2aa7f7a)
  • UserFlags: un-document SYSTEM flag (1774d4c)

Code Refactoring

Features

  • APIApplication: document terms_of_service and privacy_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 added LOADING (#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 from APIDMInteraction
    which allows type-checks to work with the in operator.
    Because of that, we also provide utility functions that help with those type checks.
    Use them in your code by importing the Utils 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

  • GatewayReady: This property has been deprecated for a while, and was
    returning an empty array for bot users. This commit removes it entirely

  • Permissions: This commit brings consistency with the documentation,
    where the permission is documented as USE_SLASH_COMMANDS, whereas the
    client has it as USE_APPLICATION_COMMANDS internally

  • MessageGetReactions: This query parameter is not usable and was not respected
    by the API.

  • OAuth2: This removes the scope property from the authorization
    code flow, as it is not expected there.

  • Gateway: This removes guild_subscriptions, as it has been
    deprecated in favor of intents.

  • Oauth2Scopes: This removes the rpc.api scope, as it has been removed
    from the documentation.

  • APIMessage: This removes the APIMessageApplication interface, as it has
    been removed from the documentation, being replaced with the OAuth2 application.

  • APIApplication: This renames the GatewayPresenceLimit flag to
    GatewayPresenceLimited, for consistency with GatewayGuildMembersLimited
    and the documented name.

  • 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.

  • Invites: This renames target_user_type to target_type,
    the actual value the API expects.

  • GatewayPresenceUpdateData: Clearing activities is done by setting them to an empty
    array, not by setting them to null.

  • UserFlags: This removes a flag that bots should not use, as Discord
    said this is an internal flag.

  • Integrations: This removes the 3 routes that bots can no longer access.

  • 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.

Don't miss a new discord-api-types release

NewReleases is sending notifications on new releases.