Added createInvite

This commit is contained in:
hydrabolt
2015-11-05 18:39:02 +00:00
parent 164e6b1b7e
commit f6dfea5abd
8 changed files with 343 additions and 30 deletions

View File

@@ -14,19 +14,10 @@ a.on("warn", function (m) {
a.on("message", function (m) {
if (m.content === "$$$") {
a.createRole(m.channel.server, {
name: "a_role!",
color: 0xFF0000,
hoist: true,
permissions: ["manageRoles"]
}).then(function (role) {
a.addMemberToRole(m.author, role).then(function () {
a.reply(m, "added!");
})["catch"](function (e) {
console.log(e.stack);
});
a.createInvite(m.channel).then(function (invite) {
return a.reply(m, invite);
})["catch"](function (e) {
console.log(e.stack);
return console.log(e.stack);
});
}
});