mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Added role creation and new role listening
bot.createRole(server, cb(err, ServerPermissions))
and
bot.on("serverRoleCreate", server, ServerPermissions)
This commit is contained in:
@@ -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));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user