mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
No description
* draft stuff fix docstring for Client#token Reorganise resolver make env better for shards, clean up docs Fix Gus' log messages 7 meh just gateway/bot not v7 :( final changes, ready for mergin! build docs make default totalShards 'auto', fix docs for totalShards type clean up docs more run docs * make consistancy real * Update and rename getRecommendedShards.js to GetRecommendedShards.js * Update GetRecommendedShards.js * Update index.js * Update RESTMethods.js * Update Shard.js * Update GetRecommendedShards.js * Update ShardingManager.js * run docs |
||
|---|---|---|
| docs | ||
| src | ||
| test | ||
| .eslintrc.json | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
discord.js is a powerful node.js module that allows you to interact with the Discord API.
Installation
Node.js 6.0.0 or newer is required.
With voice support: npm install --save discord.js --production
Without voice support: npm install --save discord.js --production --no-optional
By default, discord.js uses opusscript when playing audio over voice connections. If you're looking to play over multiple voice connections, it might be better to install node-opus. discord.js will automatically prefer node-opus over opusscript.
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');
Links
- Website
- Discord.js Server
- Discord API Server
- Documentation
- Legacy Documentation
- GitHub
- NPM
- Examples
- Related Libraries
Contact
Before reporting an issue, please read the documentation. If you can't find help there, you can ask in the official Discord.js Server.


