small fixes

This commit is contained in:
Erik 2022-07-07 21:12:35 +03:00
parent 68066db1bb
commit ea082e5f51
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
3 changed files with 18 additions and 12 deletions

View File

@ -237,6 +237,7 @@ class PermissionsCommand extends SlashCommand {
const target = role?.value || member?.value;
const targetPerms = permissions[target.id];
if(targetPerms) {
fields.push({
name: interaction.format('COMMAND_PERMISSIONS_GLOBAL_PERMS'),
value: `\`${targetPerms.global.join('`, `')}\``
@ -248,6 +249,12 @@ class PermissionsCommand extends SlashCommand {
value: `\`${targetPerms.channels[ch.id].join('`, `')}\``
});
}
} else {
fields.push({
name: target.name || target.user.tag,
value: guild.format('COMMAND_PERMISSIONS_NO_PERMS')
});
}
} else if (channel) {
// List permissions in a given channel

View File

@ -48,7 +48,7 @@ class Voice extends Setting {
},
{
name: 'GENERAL_CHANNEL',
value: `<#${setting.channel}>`,
value: setting.channel ? `<#${setting.channel}>` : '**N/A**',
inline: true
}
];

View File

@ -68,7 +68,7 @@ class SettingsMigrator {
// const { _version } = settings;
// if (!_version) return Promise.reject(new Error('Unable to determine configuration version'));
const translated = this[version](settings);
const translated = this[version](settings.settings || settings);
let webhook = null,
permissions = null;
@ -207,7 +207,6 @@ class SettingsMigrator {
}
'2'(result) {
if (result.settings) result = result.settings;
const { moderation, modlogs, muterole, mutetype, automod, wordFilter, ignore, invitefilter,
chatlogs, activity, selfrole, killitwithfire, memberlogs, staffRole, staffRule, modpoints,
userlogs, grantable, privatelog, linkfilter, autorole, welcomer, prefix, protection } = result;