Skip to content

v4.0.4

Choose a tag to compare

@MagiqueDeveloper MagiqueDeveloper released this 18 Jul 02:41

@altkit/discord v4.0.4

This release establishes @altkit/discord as a user-account-first Discord.js v14.27-compatible package targeting Discord REST API v10 and Gateway v10.

Highlights

  • Updated compatibility target to Discord.js 14.27.0.
  • Uses Discord REST API v10 and Gateway v10 by default.
  • Added modern Discord.js exports, structures, events, flags, and typings.
  • Improved attachment, voice-message, collectible, role-color, poll, and stage-instance support.
  • Strengthened REST, Gateway, CAPTCHA, MFA/TOTP, voice, and credential handling.
  • Added explicit user-account-only runtime capabilities.

User-account-first behavior

The package now explicitly reports its supported account type:

const { accountType, supportsBotAccounts, discordJsVersion } = require('@altkit/discord');

console.log(accountType); // 'user'
console.log(supportsBotAccounts); // false
console.log(discordJsVersion); // '14.27.0'

The following bot-owned functionality is now inactive:

  • Bot and OAuth bearer authentication.
  • Raw bot-token Gateway authentication.
  • Bot Gateway intents.
  • Application command registration and editing.
  • Application command permission management.
  • Application-owned interaction and autocomplete responses.
  • Interaction webhook responses.
  • Multi-process and direct shard creation.
  • Bot-only Gateway dispatch handlers.
  • Bot-capable upstream REST and WebSocket re-exports.

Blocked functionality fails locally with BOT_ACCOUNT_UNSUPPORTED or BOT_ONLY_API_DISABLED before a Discord request is made.

User workflows retained

  • Sending and editing messages.
  • Invoking slash commands.
  • Clicking buttons and using select menus.
  • Submitting modals.
  • Ordinary webhook workflows.
  • Account settings and presence.
  • Voice and video functionality.
  • CAPTCHA and MFA/TOTP handling.

Discord API v10 improvements

  • Corrected Gateway heartbeat jitter behavior.
  • Added invalid API-version close-code handling.
  • Improved v10 attachment upload and message-edit behavior.
  • Existing attachments are retained when adding new files.
  • Added voice-message attachment metadata.
  • Improved REST request validation and timeout handling.
  • Separated HTTP dispatchers between REST managers.
  • Improved credential redaction in REST, Gateway, and voice diagnostics.

Discord.js v14.27 compatibility

  • Added attachment builder voice metadata.
  • Added user and guild-member collectible support.
  • Added role member-count collections.
  • Added nullable role gradient-color support.
  • Added scheduled-event resolution for stage instances.
  • Updated public exports and TypeScript declarations.
  • Removed incompatible bot transport exports.

Documentation and testing

  • Updated the README and migration documentation.
  • Regenerated the API reference.
  • Added user-only capability and bot-feature rejection regressions.
  • Added Discord API v10 and Discord.js v14.27 regression coverage.
  • Verified TypeScript declarations with tsc and tsd.
  • Passed all 36 unit tests, linting, formatting, documentation verification, example checks, package smoke testing, and package dry-run verification.

Installation

npm install @altkit/discord@4.0.4

Upgrade notes

Bot-account applications should not upgrade to this release. Version 4.0.4 intentionally supports user-account workflows only.

Review the included migration guide before upgrading from v3.

Warning

Automating normal Discord user accounts may violate Discord's Terms of Service and can result in account restrictions or termination. Use this package at your own risk.

Full changelog: v4.0.3...v4.0.4