mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 21:43:33 +01:00
Fix permissionsFor
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -179,7 +179,7 @@ class Client extends EventEmitter {
|
|||||||
* @param {array<Guild>} [guilds=this.guilds.array()] An array of guilds to sync.
|
* @param {array<Guild>} [guilds=this.guilds.array()] An array of guilds to sync.
|
||||||
*/
|
*/
|
||||||
syncGuilds(guilds = this.guilds.array()) {
|
syncGuilds(guilds = this.guilds.array()) {
|
||||||
if (!this.client.user.bot) {
|
if (!this.user.bot) {
|
||||||
this.ws.send({
|
this.ws.send({
|
||||||
op: 12,
|
op: 12,
|
||||||
d: guilds.map(g => g.id),
|
d: guilds.map(g => g.id),
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class GuildChannel extends Channel {
|
|||||||
let permissions = 0;
|
let permissions = 0;
|
||||||
const overwrites = this.overwritesFor(member, true);
|
const overwrites = this.overwritesFor(member, true);
|
||||||
|
|
||||||
for (const role of roles) {
|
for (const role of roles.values()) {
|
||||||
permissions |= role.permissions;
|
permissions |= role.permissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user