_Arava_
_Arava_
DIAdiscord.js - Imagine an app
Created by _Arava_ on 7/20/2023 in #djs-questions
Get all users which have permission "Connect" on false in a specific voice channel
The goal is to create a list of all users which have permission "Connect" on false in a voice channel... Still no idea?
//fetch guild members
await guild.members.fetch();

//have permission to connect on false
var banneds = guild.members.cache.filter(m => !m.permissionsIn(vocal).has(PermissionsBitField.Flags.Connect));
console.log(banneds); //output is Collection(0) [Map] {} instead of users banned...
//fetch guild members
await guild.members.fetch();

//have permission to connect on false
var banneds = guild.members.cache.filter(m => !m.permissionsIn(vocal).has(PermissionsBitField.Flags.Connect));
console.log(banneds); //output is Collection(0) [Map] {} instead of users banned...
Version djs: [email protected] Version node: v18.8.0
3 replies