mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix login, clone objects when firing x-Updated events
This commit is contained in:
@@ -38,11 +38,13 @@ var ServerChannel = (function (_Channel) {
|
||||
this.name = data.name;
|
||||
this.type = data.type;
|
||||
this.position = data.position;
|
||||
this.permissionOverwrites = new _UtilCache2["default"]();
|
||||
this.permissionOverwrites = data.permissionOverwrites || new _UtilCache2["default"]();
|
||||
this.server = server;
|
||||
data.permission_overwrites.forEach(function (permission) {
|
||||
_this.permissionOverwrites.add(new _PermissionOverwrite2["default"](permission));
|
||||
});
|
||||
if (!data.permissionOverwrites) {
|
||||
data.permission_overwrites.forEach(function (permission) {
|
||||
_this.permissionOverwrites.add(new _PermissionOverwrite2["default"](permission));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ServerChannel.prototype.permissionsOf = function permissionsOf(user) {
|
||||
|
||||
Reference in New Issue
Block a user