don't filter channels

This commit is contained in:
Mathium05 2025-09-09 09:31:34 -05:00 committed by GitHub
parent 6ff8eec722
commit dd3a97f056
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -271,18 +271,6 @@ export async function onIdentify(this: WebSocket, data: Payload) {
// filter guild channels we don't have permission to view
// TODO: check if this causes issues when the user is granted other roles?
member.guild.channels = member.guild.channels
.filter((channel) => {
const perms = Permissions.finalPermission({
user: {
id: member.id,
roles: member.roles.map((x) => x.id),
},
guild: member.guild,
channel,
});
return perms.has("VIEW_CHANNEL");
})
.map((channel) => {
channel.position = member.guild.channel_ordering.indexOf(
channel.id,