fix linter complaints
This commit is contained in:
parent
d90028c491
commit
3b53aa7fa7
@ -57,7 +57,7 @@ class CaseCommand extends Command {
|
||||
|
||||
if (!infraction) return message.formattedRespond('C_CASE_NOTFOUND', { params: { caseID } });
|
||||
if (args.raw) return message.respond(`\`\`\`js\n${inspect(infraction)}\n\`\`\``);
|
||||
if (args.changes) return message.embed(await this._listChanges(message, infraction))
|
||||
if (args.changes) return message.embed(await this._listChanges(message, infraction));
|
||||
|
||||
const target = infraction.targetType === 'user' ? await this.client.resolver.resolveUser(infraction.target) : await guild.resolveChannel(infraction.target);
|
||||
const staff = await this.client.resolver.resolveUser(infraction.executor);
|
||||
@ -94,14 +94,14 @@ class CaseCommand extends Command {
|
||||
message: infraction.message
|
||||
});
|
||||
|
||||
if (infraction.data.seconds) description += '\n' + message.format(caseSlowmodeIndex, { readable: this.client.resolver.timeAgo(infraction.data.seconds), seconds: infraction.data.seconds })
|
||||
if (infraction.data.seconds) description += '\n' + message.format(caseSlowmodeIndex, { readable: this.client.resolver.timeAgo(infraction.data.seconds), seconds: infraction.data.seconds });
|
||||
|
||||
if (infraction.duration !== null) description += '\n' + message.format(caseLengthIndex, { time: this.client.resolver.timeAgo(infraction.duration), inSeconds: infraction.duration });
|
||||
|
||||
if (guild._settings.moderationPoints.enabled) description += '\n' + message.format('C_CASE_MODPOINTS', {
|
||||
points: infraction.points,
|
||||
expires: infraction.expiration
|
||||
})
|
||||
});
|
||||
|
||||
description += '\n\n' + message.format('C_CASE_REASON', { reason: infraction.reason });
|
||||
|
||||
@ -128,14 +128,14 @@ class CaseCommand extends Command {
|
||||
const staff = await this.client.resolver.resolveUser(change.staff);
|
||||
const field = {
|
||||
name: change.type,
|
||||
value: message.format('C_CASE_CHANGE_BASE', { staff: staff.tag, date: new Date(change.timestamp*1000).toUTCString(), timeAgo: this.client.resolver.timeAgo(Math.floor(Date.now()/1000) - change.timestamp) })
|
||||
}
|
||||
value: message.format('C_CASE_CHANGE_BASE', { staff: staff.tag, date: new Date(change.timestamp * 1000).toUTCString(), timeAgo: this.client.resolver.timeAgo(Math.floor(Date.now() / 1000) - change.timestamp) })
|
||||
};
|
||||
|
||||
if (change.type === 'RESOLVE') field.value += '\n' + message.format('C_CASE_CHANGES_RESOLVE', { reason: change.reason || message.format('C_CASE_CHANGE_NOREASON') });
|
||||
if (change.type === 'REASON') field.value += '\n' + message.format('C_CASE_CHANGES_REASON', { reason: change.reason });
|
||||
if (change.type === 'DURATION') field.value += '\n' + message.format('C_CASE_CHANGES_DURATION', { duration: this.client.resolver.timeAgo(change.duration) });
|
||||
|
||||
return field
|
||||
return field;
|
||||
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user