forked from Galactic/galactic-bot
bugfix
This commit is contained in:
parent
0fd87f7221
commit
79fbf9a181
@ -232,6 +232,7 @@ class PermissionsCommand extends SlashCommand {
|
|||||||
const permissions = await guild.permissions();
|
const permissions = await guild.permissions();
|
||||||
|
|
||||||
const fields = [];
|
const fields = [];
|
||||||
|
let update = false;
|
||||||
|
|
||||||
if (member || role) {
|
if (member || role) {
|
||||||
|
|
||||||
@ -322,6 +323,11 @@ class PermissionsCommand extends SlashCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (!value.length) {
|
||||||
|
delete permissions[targetId];
|
||||||
|
update = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
fields.push({
|
fields.push({
|
||||||
name: target.tag || target.name,
|
name: target.tag || target.name,
|
||||||
value
|
value
|
||||||
@ -330,6 +336,8 @@ class PermissionsCommand extends SlashCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await guild.updatePermissions();
|
||||||
|
|
||||||
if(!fields.length) return { index: 'COMMAND_PERMISSIONS_NO_PERMS' };
|
if(!fields.length) return { index: 'COMMAND_PERMISSIONS_NO_PERMS' };
|
||||||
const embed = {
|
const embed = {
|
||||||
title: interaction.format('COMMAND_PERMISSIONS_SHOW_TITLE'),
|
title: interaction.format('COMMAND_PERMISSIONS_SHOW_TITLE'),
|
||||||
|
Loading…
Reference in New Issue
Block a user