mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03: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 : [
|
permissions : [
|
||||||
// see the constants documentation for full permissions
|
// see the constants documentation for full permissions
|
||||||
"attachFiles", "sendMessages"
|
"attachFiles", "sendMessages"
|
||||||
]
|
],
|
||||||
|
mentionable: false
|
||||||
}
|
}
|
||||||
|
|
||||||
updateRole(role, data, `callback`)
|
updateRole(role, data, `callback`)
|
||||||
@@ -646,7 +647,8 @@ Updates a role in a server.
|
|||||||
permissions : [
|
permissions : [
|
||||||
// see the constants documentation for full permissions
|
// see the constants documentation for full permissions
|
||||||
"attachFiles", "sendMessages"
|
"attachFiles", "sendMessages"
|
||||||
]
|
],
|
||||||
|
mentionable: false
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteRole(role, `callback`)
|
deleteRole(role, `callback`)
|
||||||
|
|||||||
@@ -1117,7 +1117,8 @@ var InternalClient = (function () {
|
|||||||
hoist: data.hoist || role.hoist,
|
hoist: data.hoist || role.hoist,
|
||||||
name: data.name || role.name,
|
name: data.name || role.name,
|
||||||
position: data.position || role.position,
|
position: data.position || role.position,
|
||||||
permissions: role.permissions || 0
|
permissions: role.permissions || 0,
|
||||||
|
mentionable: 'mentionable' in data ? data.mentionable : role.mentionable
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.permissions) {
|
if (data.permissions) {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ var Role = (function () {
|
|||||||
this.color = data.color || 0;
|
this.color = data.color || 0;
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
|
this.mentionable = data.mentionable || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Role.prototype.serialise = function serialise(explicit) {
|
Role.prototype.serialise = function serialise(explicit) {
|
||||||
|
|||||||
@@ -935,7 +935,8 @@ export default class InternalClient {
|
|||||||
hoist: data.hoist || role.hoist,
|
hoist: data.hoist || role.hoist,
|
||||||
name: data.name || role.name,
|
name: data.name || role.name,
|
||||||
position: data.position || role.position,
|
position: data.position || role.position,
|
||||||
permissions: role.permissions || 0
|
permissions: role.permissions || 0,
|
||||||
|
mentionable: 'mentionable' in data ? data.mentionable : role.mentionable
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.permissions) {
|
if (data.permissions) {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export default class Role {
|
|||||||
this.color = data.color || 0;
|
this.color = data.color || 0;
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
|
this.mentionable = data.mentionable || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
serialise(explicit){
|
serialise(explicit){
|
||||||
|
|||||||
Reference in New Issue
Block a user