Skip to content

Releases: discord/discord-interactions-js

4.1.0 - New InteractionResponseType: LAUNCH_ACTIVITY (type 12)

26 Aug 17:36
f2fd09d
Compare
Choose a tag to compare

Adds LAUNCH_ACTIVITY (type 12) to InteractionResponseType, adding support for launching activities in response to interactions.

4.0.0

13 Jun 23:36
834c255
Compare
Choose a tag to compare

Welcome to 4.0! This release includes new features and a couple of breaking changes.

Breaking Changes

Node.js 18.4 and up required

Support for previous versions of node.js have been dropped. This isn't a soft break - we now rely on the Ed25519 algorithm in subtlecrypto, which is only available in versions 18.4 and up.

verifyKey is now async

Due to the dependency on subtle crypto, the verifyKey method is now async. Make sure to use an await when evaluating the result of verifyKey. See #73 to learn more.

const signature = req.get('X-Signature-Ed25519');
const timestamp = req.get('X-Signature-Timestamp');
const isValid = await verifyKey(req.rawBody, signature, timestamp, 'MY_CLIENT_PUBLIC_KEY');

Features

  • Added ButtonStyleTypes.Premium #55
  • The library should be significantly faster due to dropping the dependency on tweetnacl