Added role creation and new role listening

bot.createRole(server, cb(err, ServerPermissions))

and

bot.on("serverRoleCreate", server, ServerPermissions)
This commit is contained in:
hydrabolt
2015-10-26 12:06:38 +00:00
parent e3d2181914
commit 0f02856a8c
9 changed files with 189 additions and 4 deletions

View File

@@ -30,10 +30,8 @@ mybot.on("message", function (message) {
var perms = JSON.stringify(message.channel.permissionsOf(user).serialise(), null, 4);
perms = JSON.parse(perms);
request.get(message.sender.avatarURL, function(err, resp, body){
mybot.setAvatar( new Buffer(body) ).catch(error).then(() => {
mybot.reply(message, "I have your avatar now!");
});
this.createRole(message.channel.server).catch(error).then((data) => {
mybot.reply(message, JSON.stringify(data.serialise(), null, 4));
});
});