MCPcopy Create free account
hub / github.com/codebymitch/TitanBot / hasDangerousPermissions

Function hasDangerousPermissions

src/services/reactionRoleService.js:51–60  ·  view source on GitHub ↗
(role)

Source from the content-addressed store, hash-verified

49}
50
51export function hasDangerousPermissions(role) {
52 if (!role || !role.permissions) return false;
53
54 for (const permission of DANGEROUS_PERMISSIONS) {
55 if (role.permissions.has(permission)) {
56 return true;
57 }
58 }
59 return false;
60}
61
62async function validateRoleSafety(client, guildId, roleId) {
63 const guild = client.guilds?.cache?.get(guildId) || await client.guilds?.fetch?.(guildId).catch(() => null);

Callers 3

handleSetupFunction · 0.90
handleAddRoleFunction · 0.90
validateRoleSafetyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected