mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
hotfix
This commit is contained in:
1 parent
28fc86103c
commit
e966b6ce20
5 files changed
+257
-20
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { CommandBuilder, CommandHandler, Option } from "../CommandHandler.mjs";
|
||||
import { PermissionFlags } from "@fluxerjs/core";
|
||||
import Player from "../Player.mjs";
|
||||
import { Utils } from "../Utils.mjs";
|
||||
import { DatabaseManager } from "./DatabaseManager.mjs";
|
||||
@@ -59,12 +60,12 @@ export class Dashboard {
|
||||
}
|
||||
server.channels = server.channels.filter(c => {
|
||||
const ch = channels.find(cl => c.id === cl.id);
|
||||
return ch ? ch.permissionsFor?.(member)?.has?.("ViewChannel") ?? true : true;
|
||||
return ch ? ch.permissionsFor?.(member)?.has?.(PermissionFlags.ViewChannel) ?? true : true;
|
||||
});
|
||||
server.voiceChannels = server.voiceChannels.filter(c => {
|
||||
if (c.type !== 2) return false;
|
||||
const ch = channels.find(cl => c.id === cl.id);
|
||||
return ch ? ch.permissionsFor?.(member)?.has?.("ViewChannel") ?? true : true;
|
||||
return ch ? ch.permissionsFor?.(member)?.has?.(PermissionFlags.ViewChannel) ?? true : true;
|
||||
});
|
||||
return server;
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user