Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/amethyst/src/utils/permissions.ts

A powerful and flexible discordeno framework
Latest
import * as amethyst from "https://deno.land/x/amethyst@v7.0.0/src/utils/permissions.ts";

Functions

Checks if the bot has these permissions f0r the given channel

Checks if the bot has these permissions in the given guild

Calculates the permissions this member has in the given guild

Calculates the permissions this member has for the given Channel

Checks if a channel overwrite for a user id or a role id has permission in this channel

Get the missing Channel permissions this member has

Get the missing Guild permissions this member has

Checks if the given member has these permissions for the given channel

Checks if the given member has these permissions in the given guild

Checks if the first role is higher than the second role

Gets the highest role from the member in this guild

Checks if the member has a higher position than the given role

Returns the permissions that are not in the given permissionBits

Throws an error if the bot has not all of the given channel permissions

Throws an error if the bot does not have all permissions

Throws an error if this member has not all of the given permissions

Throws an error if this member has not all of the given permissions

Internal function to check if the bot has the permissions to set these overwrites

Checks if the given permission bits are matching the given permissions. ADMINISTRATOR always returns true