discord.io-gateway6
TypeScript icon, indicating that this package has built-in type declarations

2.5.3 • Public • Published

discord.io

A small, single-file, fully featured Discordapp library for Node.js and browsers.

Discord NPM

With V5 gateway getting deprecated on Oct. 16, this is a first step at getting V6 to work.

Requirements

Required:

  • Node.js 0.10.x or greater
  • Web Browser if not using Node.js

Optional:

  • Audio
    • Node.js 0.12.x
    • ffmpeg/avconv (needs to be added to PATH)

Documentation / Gitbooks

Getting Started:

Installing

Latest npm install Woor/discord.io#gateway_v6

Example

var Discord = require('discord.io');
 
var bot = new Discord.Client({
    token: "",
    autorun: true
});
 
bot.on('ready', function() {
    console.log('Logged in as %s - %s\n', bot.username, bot.id);
});
 
bot.on('message', function(user, userID, channelID, message, event) {
    if (message === "ping") {
        bot.sendMessage({
            to: channelID,
            message: "pong"
        });
    }
});

Package Sidebar

Install

npm i discord.io-gateway6

Weekly Downloads

1

Version

2.5.3

License

MIT

Unpacked Size

186 kB

Total Files

16

Last publish

Collaborators

  • bwang22