Added permissions

This commit is contained in:
hydrabolt
2015-11-01 17:46:24 +00:00
parent 0d6e913454
commit b2a74be0f9
10 changed files with 293 additions and 10 deletions

View File

@@ -13,10 +13,10 @@ a.on("warn", function (m) {
});
a.on("message", function (m) {
if (m.content === "$$$") a.internal.createServer("H a h").then(function (srv) {
console.log(srv);
a.reply(m, srv);
});
if (m.content === "$$$") a.reply(m, "you have the roles:\n" + m.channel.server.rolesOfUser(m.author).map(function (v) {
return "**" + v.name + "** " + v.id + "\n";
}));
if (m.content === "$$") a.reply(m, JSON.stringify(m.channel.permissionsOf(m.author).serialise(), null, 4).replace(/true/g, "**true**"));
});
a.on("serverMemberRemoved", function (r, s) {
console.log(r, s);