forked from Galactic/galactic-bot
fixes
This commit is contained in:
parent
812d9d27ba
commit
2daf1cfbd7
@ -90,7 +90,7 @@ class CaseCommand extends SlashCommand {
|
|||||||
|
|
||||||
if (guild._settings.modpoints.enabled) description += '\n' + invoker.format('COMMAND_CASE_MODPOINTS', {
|
if (guild._settings.modpoints.enabled) description += '\n' + invoker.format('COMMAND_CASE_MODPOINTS', {
|
||||||
points: infraction.points,
|
points: infraction.points,
|
||||||
expires: infraction.expiration
|
expires: `<t:${Math.round(infraction.expiration / 1000)}:R>`
|
||||||
});
|
});
|
||||||
|
|
||||||
description += '\n\n' + invoker.format('COMMAND_CASE_REASON', { reason: infraction.reason });
|
description += '\n\n' + invoker.format('COMMAND_CASE_REASON', { reason: infraction.reason });
|
||||||
|
@ -38,8 +38,8 @@ class SelfroleCommand extends SlashCommand {
|
|||||||
const ownHighest = me.roles.highest;
|
const ownHighest = me.roles.highest;
|
||||||
|
|
||||||
const memberRoles = member.roles.cache.map((r) => r.id);
|
const memberRoles = member.roles.cache.map((r) => r.id);
|
||||||
const tooHigh = roles?.value.filter((r) => r.position > ownHighest.position);
|
|
||||||
const invalid = roles?.value.filter((r) => !selfrole.roles.includes(r.id)) || [];
|
const invalid = roles?.value.filter((r) => !selfrole.roles.includes(r.id)) || [];
|
||||||
|
const tooHigh = roles?.value.filter((r) => r.position > ownHighest.position && !invalid.includes(r.id)) || [];
|
||||||
const _roles = roles?.value.filter((r) => selfrole.roles.includes(r.id) && !tooHigh.some((x) => x.id === r.id)) || [];
|
const _roles = roles?.value.filter((r) => selfrole.roles.includes(r.id) && !tooHigh.some((x) => x.id === r.id)) || [];
|
||||||
// console.log(tooHigh, invalid, _roles);
|
// console.log(tooHigh, invalid, _roles);
|
||||||
let warning = '';
|
let warning = '';
|
||||||
|
@ -128,6 +128,7 @@ class ModerationPoints extends Setting {
|
|||||||
).join('\n'),
|
).join('\n'),
|
||||||
inline: true
|
inline: true
|
||||||
},
|
},
|
||||||
|
{ name: ZeroWidthChar, value: ZeroWidthChar, inline: true },
|
||||||
{
|
{
|
||||||
name: 'SETTING_MODPOINTS_ASSOCIATIONS',
|
name: 'SETTING_MODPOINTS_ASSOCIATIONS',
|
||||||
value: Object.entries(setting.associations).map(([type, pts]) => `**${type}**: \`${pts}\``).join('\n') || '**N/A**'
|
value: Object.entries(setting.associations).map(([type, pts]) => `**${type}**: \`${pts}\``).join('\n') || '**N/A**'
|
||||||
|
Loading…
Reference in New Issue
Block a user