mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add mentionable to role objects (#358)
This commit is contained in:
committed by
abalabahaha
parent
48595ddd19
commit
d2f0f4993e
@@ -622,7 +622,8 @@ Creates a new role in a server.
|
||||
permissions : [
|
||||
// see the constants documentation for full permissions
|
||||
"attachFiles", "sendMessages"
|
||||
]
|
||||
],
|
||||
mentionable: false
|
||||
}
|
||||
|
||||
updateRole(role, data, `callback`)
|
||||
@@ -646,7 +647,8 @@ Updates a role in a server.
|
||||
permissions : [
|
||||
// see the constants documentation for full permissions
|
||||
"attachFiles", "sendMessages"
|
||||
]
|
||||
],
|
||||
mentionable: false
|
||||
}
|
||||
|
||||
deleteRole(role, `callback`)
|
||||
|
||||
@@ -1117,7 +1117,8 @@ var InternalClient = (function () {
|
||||
hoist: data.hoist || role.hoist,
|
||||
name: data.name || role.name,
|
||||
position: data.position || role.position,
|
||||
permissions: role.permissions || 0
|
||||
permissions: role.permissions || 0,
|
||||
mentionable: 'mentionable' in data ? data.mentionable : role.mentionable
|
||||
};
|
||||
|
||||
if (data.permissions) {
|
||||
|
||||
@@ -37,6 +37,7 @@ var Role = (function () {
|
||||
this.color = data.color || 0;
|
||||
this.server = server;
|
||||
this.client = client;
|
||||
this.mentionable = data.mentionable || false;
|
||||
}
|
||||
|
||||
Role.prototype.serialise = function serialise(explicit) {
|
||||
|
||||
@@ -935,7 +935,8 @@ export default class InternalClient {
|
||||
hoist: data.hoist || role.hoist,
|
||||
name: data.name || role.name,
|
||||
position: data.position || role.position,
|
||||
permissions: role.permissions || 0
|
||||
permissions: role.permissions || 0,
|
||||
mentionable: 'mentionable' in data ? data.mentionable : role.mentionable
|
||||
};
|
||||
|
||||
if (data.permissions) {
|
||||
|
||||
@@ -40,6 +40,7 @@ export default class Role {
|
||||
this.color = data.color || 0;
|
||||
this.server = server;
|
||||
this.client = client;
|
||||
this.mentionable = data.mentionable || false;
|
||||
}
|
||||
|
||||
serialise(explicit){
|
||||
|
||||
Reference in New Issue
Block a user