* friggin webpack tho
* probably important
* add all the stuff to the package.json
* add minify builds and a nice package.json script to run it all
* clean up
* use uglify harmony branch so we can actually run minify builds that work
* update build system
* make test better
* clean up
* fix issues with compression
*
* c++ requirements in a node lib? whaaaaat?
* fix travis yml?
* put railings on voice connections
* 🖕🏻
* aaaaaa
* handle arraybuffers in the unlikely event one is sent
* support arraybuffers in resolvebuffer
* this needs to be fixed at some point
* this was fixed
* disable filename versioning if env VERSIONED is set to false
* Update ClientDataResolver.js
* Update ClientVoiceManager.js
* Update WebSocketManager.js
* Update ConvertArrayBuffer.js
* Update webpack.html
* enable compression for browser and fix ws error handler
* Update WebSocketManager.js
* everything will be okay gawdl3y
* compression is slower in browser, so rip the last three hours of my life
* Update Constants.js
* Update .gitignore
About
discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend. Usability and performance are key focuses of discord.js, and it also has nearly 100% coverage of the Discord API.
Installation
Node.js 6.0.0 or newer is required.
Without voice support: npm install discord.js --save
With voice support (node-opus): npm install discord.js node-opus --save
With voice support (opusscript): npm install discord.js opusscript --save
The preferred audio engine is node-opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose node-opus. Using opusscript is only recommended for development environments where node-opus is tough to get working. For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.
Example Usage
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log('I am ready!');
});
client.on('message', message => {
if (message.content === 'ping') {
message.reply('pong');
}
});
client.login('your token');
A bot template using discord.js can be generated using generator-discordbot.
Links
- Website
- Discord.js server
- Discord API server
- Documentation
- Legacy (v8) documentation
- Examples
- GitHub
- NPM
- Related libraries
Contributing
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
documentation.
See the contributing guide if you'd like to submit a PR.
Help
If you don't understand something in the 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.


