BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / discord.io
NameLast commitLast update
docs Import template 4 years ago
examples Import template 4 years ago
lib Import template 4 years ago
typings Import template 4 years ago
.npmignore Import template 4 years ago
example.js Import template 4 years ago
fillsquare.png Import template 4 years ago
LICENSE Import template 4 years ago
logo-animated.svg Import template 4 years ago
logo.ai Import template 4 years ago
logo.svg Import template 4 years ago
package.json Import template 4 years ago
README.md Import template 4 years ago
README.md

<h1 align="center">discord.io</h1>

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

Discord NPM

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

Stable npm install discord.io

Latest npm install izy521/discord.io

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"
        });
    }
});