Skip to content

GregoryGregoryGregory/discord.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord.js

Discord npm npm Build Status David

NPM

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

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.

About

A powerful library for interacting with the Discord API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%