8000 GitHub - izy521/discord.io at 2.4.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 25, 2020. It is now read-only.
/ discord.io Public archive

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

License

Notifications You must be signed in to change notification settings

izy521/discord.io

Repository files navigation

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

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