Functiongatewayv0.11.0
Throws:
A
Noticewhen the check refuses. It lists the missing or present permissions.
checkPermissions(
{ for: target, in: channel, scope, inverse, notice },
input: CheckPermissionOptions
): voidimport { PermissionFlagsBits } from 'discord.js';
import { checkPermissions } from '@seedcord/gateway';
checkPermissions({ for: member, scope: [PermissionFlagsBits.KickMembers] });
checkPermissions({ for: role, in: channel, scope: [PermissionFlagsBits.SendMessages] });// refuse when the member holds Administrator, with your own Notice class
checkPermissions({ for: member, scope: [PermissionFlagsBits.Administrator], inverse: true, notice: TooPowerful });{ for: target, in: channel, scope, inverse, notice }
{ for: target, in: channel, scope, inverse, notice }input
input: CheckPermissionOptions