mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
Unoverlap allow when denying a permission overwrite
This commit is contained in:
@@ -1143,7 +1143,9 @@ var InternalClient = (function () {
|
|||||||
for (var perm in updated) {
|
for (var perm in updated) {
|
||||||
if (updated[perm]) {
|
if (updated[perm]) {
|
||||||
data.allow |= _Constants.Permissions[perm] || 0;
|
data.allow |= _Constants.Permissions[perm] || 0;
|
||||||
|
data.deny &= ~(_Constants.Permissions[perm] || 0);
|
||||||
} else {
|
} else {
|
||||||
|
data.allow &= ~(_Constants.Permissions[perm] || 0);
|
||||||
data.deny |= _Constants.Permissions[perm] || 0;
|
data.deny |= _Constants.Permissions[perm] || 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,23 +6,23 @@ exports.__esModule = true;
|
|||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||||
|
|
||||||
var TokenCacher = (function () {
|
var TokenCacher = (function () {
|
||||||
function TokenCacher() {
|
function TokenCacher() {
|
||||||
_classCallCheck(this, TokenCacher);
|
_classCallCheck(this, TokenCacher);
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenCacher.prototype.setToken = function setToken() {};
|
TokenCacher.prototype.setToken = function setToken() {};
|
||||||
|
|
||||||
TokenCacher.prototype.save = function save() {};
|
TokenCacher.prototype.save = function save() {};
|
||||||
|
|
||||||
TokenCacher.prototype.getToken = function getToken() {
|
TokenCacher.prototype.getToken = function getToken() {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
TokenCacher.prototype.init = function init(ind) {
|
TokenCacher.prototype.init = function init(ind) {
|
||||||
this.done = true;
|
this.done = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
return TokenCacher;
|
return TokenCacher;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports["default"] = TokenCacher;
|
exports["default"] = TokenCacher;
|
||||||
|
|||||||
@@ -914,7 +914,9 @@ export default class InternalClient {
|
|||||||
for (var perm in updated) {
|
for (var perm in updated) {
|
||||||
if (updated[perm]) {
|
if (updated[perm]) {
|
||||||
data.allow |= (Permissions[perm] || 0);
|
data.allow |= (Permissions[perm] || 0);
|
||||||
|
data.deny &= ~(Permissions[perm] || 0);
|
||||||
} else {
|
} else {
|
||||||
|
data.allow &= ~(Permissions[perm] || 0);
|
||||||
data.deny |= (Permissions[perm] || 0);
|
data.deny |= (Permissions[perm] || 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user