-
Notifications
You must be signed in to change notification settings - Fork 45
Home
qeled edited this page Oct 26, 2015
·
9 revisions
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.
- 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
)
- 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
- Stream interfaces
- Channel and role reordering
Currently only inline documentation in files:
lib/interfaces/*.js
lib/index.js
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");
}
});
- Voice interfaces
- Member pruning
- Account creation (?)
- WebRTC transport implementation (?)