small fixes
This commit is contained in:
parent
68066db1bb
commit
ea082e5f51
@ -237,15 +237,22 @@ class PermissionsCommand extends SlashCommand {
|
||||
|
||||
const target = role?.value || member?.value;
|
||||
const targetPerms = permissions[target.id];
|
||||
fields.push({
|
||||
name: interaction.format('COMMAND_PERMISSIONS_GLOBAL_PERMS'),
|
||||
value: `\`${targetPerms.global.join('`, `')}\``
|
||||
});
|
||||
const channels = channel ? [channel.value] : await guild.resolveChannels(Object.keys(targetPerms.channels));
|
||||
for (const ch of channels) {
|
||||
if(targetPerms) {
|
||||
fields.push({
|
||||
name: `#${ch.name}`,
|
||||
value: `\`${targetPerms.channels[ch.id].join('`, `')}\``
|
||||
name: interaction.format('COMMAND_PERMISSIONS_GLOBAL_PERMS'),
|
||||
value: `\`${targetPerms.global.join('`, `')}\``
|
||||
});
|
||||
const channels = channel ? [channel.value] : await guild.resolveChannels(Object.keys(targetPerms.channels));
|
||||
for (const ch of channels) {
|
||||
fields.push({
|
||||
name: `#${ch.name}`,
|
||||
value: `\`${targetPerms.channels[ch.id].join('`, `')}\``
|
||||
});
|
||||
}
|
||||
} else {
|
||||
fields.push({
|
||||
name: target.name || target.user.tag,
|
||||
value: guild.format('COMMAND_PERMISSIONS_NO_PERMS')
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ class Voice extends Setting {
|
||||
|
||||
if (opts.enabled) setting.enabled = opts.enabled.value;
|
||||
if (opts.channel) setting.channel = opts.channel.value.id;
|
||||
|
||||
|
||||
return { index: 'SETTING_SUCCESS_ALT' };
|
||||
|
||||
}
|
||||
@ -48,7 +48,7 @@ class Voice extends Setting {
|
||||
},
|
||||
{
|
||||
name: 'GENERAL_CHANNEL',
|
||||
value: `<#${setting.channel}>`,
|
||||
value: setting.channel ? `<#${setting.channel}>` : '**N/A**',
|
||||
inline: true
|
||||
}
|
||||
];
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user