BlackSwanBay / discord.io

A small, single-file library for creating DiscordApp clients from Node.js or the browser

Home Page:https://discord.gg/0MvHMfHcTKVVmIGP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discord.io

A small, single-file, fully featured [Discordapp](https://discordapp.com) library for Node.js and browsers.

Discord NPM

Installation

npm install discord.io

Documentation / Gitbooks

Example

var Discord = require('discord.io');
var bot = new Discord.Client({
    token: "",
    autorun: true
});

bot.on('ready', function() {
    console.log(bot.username + " - (" + bot.id + ")");
});

bot.on('message', function(user, userID, channelID, message, event) {
    if (message === "ping") {
        bot.sendMessage({
            to: channelID,
            message: "pong"
        });
    }
});

About

A small, single-file library for creating DiscordApp clients from Node.js or the browser

https://discord.gg/0MvHMfHcTKVVmIGP

License:MIT License


Languages

Language:JavaScript 100.0%