Fix permissions checking not working if false
All checks were successful
CI / CI (push) Successful in 1m22s
All checks were successful
CI / CI (push) Successful in 1m22s
This commit is contained in:
parent
9ac900bc4d
commit
be8d9660ba
1 changed files with 2 additions and 1 deletions
|
@ -1,10 +1,11 @@
|
||||||
const setServerPrefix = require("../../util/setServerPrefix");
|
const setServerPrefix = require("../../util/setServerPrefix");
|
||||||
|
const { PermissionsBitField } = require('discord.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'prefix',
|
name: 'prefix',
|
||||||
description: 'Change the prefix of the bot in this server.',
|
description: 'Change the prefix of the bot in this server.',
|
||||||
execute({ message, client, args, prefix }) {
|
execute({ message, client, args, prefix }) {
|
||||||
if (!message.member.permissions.has('MANAGE_GUILD')) {
|
if (!message.member.permissions.has(PermissionsBitField.Flags.ManageGuild)) {
|
||||||
message.channel.send("You do not have sufficient permissions(MANAGE_GUILD) to change the prefix of this server.")
|
message.channel.send("You do not have sufficient permissions(MANAGE_GUILD) to change the prefix of this server.")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue