Module

x/discordeno/plugins/permissions/mod.ts

Discord API library for Deno
Go to Latest
import * as mod from "https://dotland.deno.dev/x/discordeno@13.0.0-rc45/plugins/permissions/mod.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

This function converts an array of permissions into the bitwise string.

Calculates the permissions this member has for the given Channel

This function converts a bitwise string to permission strings

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