mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 12:22:50 +02:00
Add helper for permission calculations
This commit is contained in:
parent
2fb68900c7
commit
bf3d219716
4 changed files with 50 additions and 6 deletions
|
@ -137,7 +137,7 @@ const commands = [{
|
|||
// Check CREATE_INSTANT_INVITE permission
|
||||
assert(message.member)
|
||||
const guildPermissions = utils.getPermissions(message.member.roles, guild.roles)
|
||||
if (!(guildPermissions & BigInt(1))) {
|
||||
if (!(guildPermissions & DiscordTypes.PermissionFlagsBits.CreateInstantInvite)) {
|
||||
return discord.snow.channel.createMessage(channel.id, {
|
||||
...ctx,
|
||||
content: "You don't have permission to invite people to this Discord server."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue