Fixed server update listener

This commit is contained in:
hydrabolt
2015-11-01 14:09:00 +00:00
parent 5adcb5b8eb
commit 7175218ecf
14 changed files with 129 additions and 12 deletions

View File

@@ -8,6 +8,9 @@ var a = new module.exports.Client();
a.on("debug", function (m) {
return console.log("[debug]", m);
});
a.on("warn", function (m) {
return console.log("[warn]", m);
});
a.on("message", function (m) {
if (m.content === "$$$") a.internal.createServer("H a h").then(function (srv) {
@@ -15,6 +18,9 @@ a.on("message", function (m) {
a.reply(m, srv);
});
});
a.on("serverUpdated", function (oldsrv, newsrv) {
console.log(oldsrv.name, "v", newsrv.name);
});
a.login(process.env["discordEmail"], process.env["discordPass"])["catch"](function (e) {
return console.log(e);