fix permissions

This commit is contained in:
Cynthia Foxwell 2023-01-24 14:33:17 -07:00
parent 23ac2e3838
commit dc954a3f60
2 changed files with 4 additions and 4 deletions

View file

@ -179,7 +179,7 @@ settings.callback = async function (msg, line, [cmd, key, value]) {
}
case "enable": {
if (
!msg.channel.permissionsOf(msg.author.id).has("MANAGE_GUILD") &&
!msg.channel.permissionsOf(msg.author.id).has("manageGuild") &&
!hf.config.elevated.includes(msg.author.id)
)
return "You do not have `Manage Server` permissions";
@ -194,7 +194,7 @@ settings.callback = async function (msg, line, [cmd, key, value]) {
}
case "disable": {
if (
!msg.channel.permissionsOf(msg.author.id).has("MANAGE_GUILD") &&
!msg.channel.permissionsOf(msg.author.id).has("manageGuild") &&
!hf.config.elevated.includes(msg.author.id)
)
return "You do not have `Manage Server` permissions";

View file

@ -10,10 +10,10 @@ tidy.category = CATEGORY;
tidy.helpText = "Clean up messages";
tidy.usage = "[subcommand] <count> <extra>";
tidy.callback = async function (msg, line, [subcommand, count, extra]) {
if (!msg.channel.permissionsOf(msg.author.id).has("MANAGE_MESSAGES")) {
if (!msg.channel.permissionsOf(msg.author.id).has("manageMessages")) {
return "You do not have `Manage Messages` permission.";
}
if (!msg.channel.permissionsOf(hf.bot.user.id).has("MANAGE_MESSAGES")) {
if (!msg.channel.permissionsOf(hf.bot.user.id).has("manageMessages")) {
return "I do not have `Manage Messages` permission.";
}