3.0 KiB
discord.js is a powerful node.js module that allows you to interact with the Discord API.
Welcome!
Welcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more stable and performant than previous versions.
Installation
Node.js 6.0.0 or newer is required.
Without voice support: npm install discord.js --save --production
With voice support (node-opus): npm install discord.js node-opus --save --production
With voice support (opusscript): npm install discord.js opusscript --save --production
If both audio packages are installed, discord.js will automatically prefer node-opus.
The preferred audio engine is node-opus, as it performs significantly better than opusscript. Using opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge. For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.
Guides
Links
- Website
- Discord.js server
- Discord API server
- Documentation
- Legacy (v8) documentation
- Examples
- GitHub
- NPM
- Related libraries
Help
If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official Discord.js Server.


