forked from Galactic/galactic-bot
tweaking permissions command output
This commit is contained in:
parent
eb5c989e88
commit
9dcdfdc403
@ -44,6 +44,9 @@ Global permissions
|
|||||||
[COMMAND_PERMISSIONS_SHOW_TITLE]
|
[COMMAND_PERMISSIONS_SHOW_TITLE]
|
||||||
Granted permissions
|
Granted permissions
|
||||||
|
|
||||||
|
[COMMAND_PERMISSIONS_DESC]
|
||||||
|
Showing permissions {forin} **{target}**
|
||||||
|
|
||||||
[COMMAND_PERMISSIONS_NO_PERMS]
|
[COMMAND_PERMISSIONS_NO_PERMS]
|
||||||
No permissions granted
|
No permissions granted
|
||||||
|
|
||||||
|
@ -134,3 +134,11 @@ switch({toggle}) {
|
|||||||
'off';
|
'off';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[FOR_IN_TOGGLE]
|
||||||
|
switch({toggle}) {
|
||||||
|
case true:
|
||||||
|
'for'; break;
|
||||||
|
case false:
|
||||||
|
'in'; break;
|
||||||
|
}
|
@ -235,6 +235,7 @@ class PermissionsCommand extends SlashCommand {
|
|||||||
|
|
||||||
const fields = [];
|
const fields = [];
|
||||||
let update = false;
|
let update = false;
|
||||||
|
const target = member?.value || role?.value || channel?.value;
|
||||||
|
|
||||||
if (member || role) {
|
if (member || role) {
|
||||||
|
|
||||||
@ -342,6 +343,7 @@ class PermissionsCommand extends SlashCommand {
|
|||||||
|
|
||||||
if(!fields.length) return { index: 'COMMAND_PERMISSIONS_NO_PERMS' };
|
if(!fields.length) return { index: 'COMMAND_PERMISSIONS_NO_PERMS' };
|
||||||
const embed = {
|
const embed = {
|
||||||
|
description: target ? interaction.format('COMMAND_PERMISSIONS_DESC', { target: target.tag || target.name || 'any', forin: interaction.format('FOR_IN_TOGGLE', { toggle: target.type === undefined }, { code: true }) }) : '',
|
||||||
title: interaction.format('COMMAND_PERMISSIONS_SHOW_TITLE'),
|
title: interaction.format('COMMAND_PERMISSIONS_SHOW_TITLE'),
|
||||||
fields: [ ]
|
fields: [ ]
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user