This commit is contained in:
NoLogicAlan committed 2026-05-16 22:03:22 +03:00
1 parent 28fc86103c
commit e966b6ce20
5 files changed
+257 -20

No files matched your search

+3 -2
View File
@@ -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) {