3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 04:25:01 +00:00

removed unnecessary string literal and simplified stuff

This commit is contained in:
almeidx 2021-07-29 10:08:55 +01:00
parent 392e7fc56e
commit afe0ec1194
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
17 changed files with 23 additions and 25 deletions

View file

@ -29,7 +29,7 @@ export const CasesModCmd = modActionsCmd({
async run({ pluginData, message: msg, args }) {
const modId = args.mod || msg.author.id;
const mod = await resolveUser(pluginData.client, modId);
const modName = mod instanceof User ? `${mod.tag}` : modId;
const modName = mod instanceof User ? mod.tag : modId;
const casesPlugin = pluginData.getPlugin(CasesPlugin);
const totalCases = await casesPlugin.getTotalCasesByMod(modId);

View file

@ -61,7 +61,7 @@ export const CasesUserCmd = modActionsCmd({
const normalCases = cases.filter(c => !c.is_hidden);
const hiddenCases = cases.filter(c => c.is_hidden);
const userName = user instanceof UnknownUser && cases.length ? cases[cases.length - 1].user_name : `${user.tag}`;
const userName = user instanceof UnknownUser && cases.length ? cases[cases.length - 1].user_name : user.tag;
if (cases.length === 0) {
msg.channel.send(`No cases found for **${userName}**`);

View file

@ -68,7 +68,7 @@ export const DeleteCaseCmd = modActionsCmd({
}
}
const deletedByName = `${message.author.tag}`;
const deletedByName = message.author.tag;
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
const deletedAt = timeAndDate.inGuildTz().format(timeAndDate.getDateFormat("pretty_datetime"));

View file

@ -30,7 +30,7 @@ export const NoteCmd = modActionsCmd({
return;
}
const userName = `${user.tag}`;
const userName = user.tag;
const reason = formatReasonWithAttachments(args.note, msg.attachments.array());
const casesPlugin = pluginData.getPlugin(CasesPlugin);