mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +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:
@@ -83,6 +83,18 @@ class Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
addRole(data){
|
||||
|
||||
if(this.getRole(data.id)){
|
||||
return this.getRole(data.id);
|
||||
}
|
||||
|
||||
var perms = new ServerPermissions(data);
|
||||
this.roles.push(perms);
|
||||
return perms;
|
||||
|
||||
}
|
||||
|
||||
updateRole(data){
|
||||
|
||||
var oldRole = this.getRole(data.id);
|
||||
|
||||
Reference in New Issue
Block a user