tweaking permissions command output
This commit is contained in:
parent
eb5c989e88
commit
9dcdfdc403
@ -44,6 +44,9 @@ Global permissions
|
||||
[COMMAND_PERMISSIONS_SHOW_TITLE]
|
||||
Granted permissions
|
||||
|
||||
[COMMAND_PERMISSIONS_DESC]
|
||||
Showing permissions {forin} **{target}**
|
||||
|
||||
[COMMAND_PERMISSIONS_NO_PERMS]
|
||||
No permissions granted
|
||||
|
||||
|
@ -134,3 +134,11 @@ switch({toggle}) {
|
||||
'off';
|
||||
break;
|
||||
}
|
||||
|
||||
[FOR_IN_TOGGLE]
|
||||
switch({toggle}) {
|
||||
case true:
|
||||
'for'; break;
|
||||
case false:
|
||||
'in'; break;
|
||||
}
|
@ -235,6 +235,7 @@ class PermissionsCommand extends SlashCommand {
|
||||
|
||||
const fields = [];
|
||||
let update = false;
|
||||
const target = member?.value || role?.value || channel?.value;
|
||||
|
||||
if (member || role) {
|
||||
|
||||
@ -342,6 +343,7 @@ class PermissionsCommand extends SlashCommand {
|
||||
|
||||
if(!fields.length) return { index: 'COMMAND_PERMISSIONS_NO_PERMS' };
|
||||
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'),
|
||||
fields: [ ]
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user