Skip to content
qeled edited this page Oct 26, 2015 · 9 revisions

Discordie

A Node.js module providing a set of interfaces to interact with Discord API.

Requires at least Node.js 4.0.0.

This module is in development. Some things may break.

Join #node_discordie in Discord API.

Fully Implemented

  • Role and channel permission management API
  • Message management API
  • Member management API (kicking, banning, etc.)
  • Direct messages API
  • Voice encoding, sending, decoding and receiving (audio streaming example: examples/massive.js)

Mostly Implemented

  • Guild (server) and channel management API
  • No member pruning yet
  • Local user profile (username change, statuses)
  • No proper API for uploading avatars and guild icons yet

Planned

  • Stream interfaces
  • Channel and role reordering

Documentation

Currently only inline documentation in files:

  • lib/interfaces/*.js
  • lib/index.js

Example

var Discordie = require("discordie");

var auth = {
  email: "[email protected]",
  password: ""
};

var client = new Discordie();

function connect() { client.connect(auth); }
connect();

client.Dispatcher.on(Discordie.Events.DISCONNECTED, (e) => {
  console.log("Reconnecting");
  setTimeout(connect, 5000);
});

client.Dispatcher.on(Discordie.Events.GATEWAY_READY, (e) => {
  console.log("Connected as: " + client.User.username);
});

client.Dispatcher.on(Discordie.Events.MESSAGE_CREATE, (e) => {
  console.log("new message: ");
  console.log(JSON.stringify(e.message, null, "  "));

  if (e.message.content == "ping") {
    e.message.channel.sendMessage("pong");
  }
});

Links

.NET:

Discord.Net

DiscordSharp

Node.js

discord.io

discord.js

Java:

Discord4J

Python

discord.py

Ruby

discordrb

TODO

  • Voice interfaces
  • Member pruning
  • Account creation (?)
  • WebRTC transport implementation (?)
Clone this wiki locally