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

@@ -8,10 +8,15 @@ a.on("warn", (m) => console.log("[warn]", m));
a.on("message", m => {
if(m.content === "$$$")
a.internal.createServer("H a h").then(srv => {
console.log(srv);
a.reply(m, srv);
});
a.reply(m,
"you have the roles:\n" + m.channel.server.rolesOfUser(m.author)
.map(v => "**"+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", (r, s) => {
console.log(r, s);