added features and fixes
This commit is contained in:
@@ -15,6 +15,9 @@ const PERMS = {
|
||||
CONNECT_VOICE: 256,
|
||||
SPEAK_VOICE: 512,
|
||||
SHARE_SCREEN: 1024,
|
||||
CHANGE_NICKNAME: 8192,
|
||||
MANAGE_NICKNAMES: 16384,
|
||||
MANAGE_ROLES: 32768,
|
||||
} as const;
|
||||
|
||||
export { PERMS };
|
||||
@@ -45,6 +48,10 @@ export function usePermissions(serverId: string | null) {
|
||||
canBan: has(PERMS.BAN_MEMBERS),
|
||||
canMute: has(PERMS.MANAGE_MESSAGES),
|
||||
canManageChannels: has(PERMS.MANAGE_CHANNELS),
|
||||
canManageRoles: has(PERMS.MANAGE_ROLES),
|
||||
canManageServer: has(PERMS.MANAGE_SERVER),
|
||||
canChangeNickname: has(PERMS.CHANGE_NICKNAME),
|
||||
canManageNicknames: has(PERMS.MANAGE_NICKNAMES),
|
||||
isOwner,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user