Understanding Discord's API Gateway v10 and Major 2026 Changes
Discord's API evolves continuously. Developers who started with discord.js v12 and never updated their knowledge are often surprised when code that "worked fine" stops working after a version update. Here is what you actually need to know about the current API landscape.
API v10 in 2026: The Current Standard
Discord API v10 has been the stable version since 2022. discord.js v14+ uses v10 by default. Key things that changed from earlier versions:
Intents are mandatory: You must declare exactly which events your bot listens to. No more receiving all events by default.
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers, // Privileged - requires approval for 100+ server bots
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent, // Privileged - requires approval for 100+ server bots
]
});
Privileged intents require approval: GUILD_MEMBERS, GUILD_PRESENCES, and MESSAGE_CONTENT require manual approval from Discord for bots in 100+ servers. Apply in Developer Portal → Your Bot → Privileged Gateway Intents.
Slash Commands Are the Standard
Prefix commands (!help, !ban) are still functional but slash commands (/help, /ban) are the recommended standard in 2026. They have better UX (autocomplete, parameter validation) and Discord surfaces them in the UI.
// Slash command registration
const commands = [
new SlashCommandBuilder()
.setName('ban')
.setDescription('Ban a user')
.addUserOption(option => option
.setName('user')
.setDescription('User to ban')
.setRequired(true))
.addStringOption(option => option
.setName('reason')
.setDescription('Reason for ban'))
];
Application Commands vs. Message Commands
A key architectural distinction in 2026: Application commands (slash commands, context menu commands) are registered with Discord and shown in the UI. Message commands (prefix-based) are parsed entirely by your bot from message content.
For new bots: use application commands exclusively. For existing bots: maintain prefix commands for backwards compatibility while adding slash command equivalents.
Common Migration Issues
From v12/v13 to v14:
MessageEmbed→EmbedBuilderclient.user.setActivity→client.user.setPresencemessage.channel.sendfor embeds now needs{ embeds: [embed] }not{ embed: embed }
Keep your package.json updated:
npm update discord.js @discordjs/rest