TutorialJanuary 10, 20258 min read
Migrating to Discord.js v14: Complete Tutorial
Discord.js v14 brings major changes. Here's everything you need to know to migrate your bot successfully.
Marcus Johnson
Bot Developer

Migrating to Discord.js v14: Complete Tutorial
Discord.js v14 introduced significant breaking changes. This guide will help you upgrade smoothly.
Major Changes
Intents are Required
You must now explicitly declare which intents your bot needs:
javascript
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
]
});Slash Commands are Default
Prefix commands should be replaced with slash commands for better UX:
javascript
const { SlashCommandBuilder } = require('discord.js');
const command = new SlashCommandBuilder()
.setName('ping')
.setDescription('Check bot latency');Builders Pattern
Many objects now use a builder pattern:
javascript
const { EmbedBuilder } = require('discord.js');
const embed = new EmbedBuilder()
.setTitle('Hello!')
.setColor(0x0099FF);Migration Checklist
- Update your package.json to discord.js v14
- Replace all deprecated methods
- Add required intents
- Convert prefix commands to slash commands
- Update embed syntax
- Test thoroughly
Deploying on NexusHost
Once migrated, deploy to NexusHost:
- Push changes to GitHub
- NexusHost auto-detects Node.js
- Your bot restarts with the new version
Conclusion
While v14 requires significant changes, the improvements in performance and developer experience are worth it.

