Reformat all files with Prettier

This commit is contained in:
Dragory 2021-09-11 19:06:51 +03:00
parent 0cde0d46d2
commit ac79eb09f5
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
206 changed files with 727 additions and 888 deletions

View file

@ -102,14 +102,14 @@ export async function getUserInfoEmbed(
largest: 2,
round: true,
});
const roles = Array.from(member.roles.cache.values()).filter(r => r.id !== pluginData.guild.id);
const roles = Array.from(member.roles.cache.values()).filter((r) => r.id !== pluginData.guild.id);
roles.sort(sorter("position", "DESC"));
embed.fields.push({
name: preEmbedPadding + "Member information",
value: trimLines(`
${user.bot ? "Added" : "Joined"}: **${joinAge} ago** (\`${prettyJoinedAt}\`)
${roles.length > 0 ? "Roles: " + roles.map(r => `<@&${r.id}>`).join(", ") : ""}
${roles.length > 0 ? "Roles: " + roles.map((r) => `<@&${r.id}>`).join(", ") : ""}
`),
});
@ -130,14 +130,14 @@ export async function getUserInfoEmbed(
value: `${user.bot ? "Bot" : "User"} is not on the server`,
});
}
const cases = (await pluginData.state.cases.getByUserId(user.id)).filter(c => !c.is_hidden);
const cases = (await pluginData.state.cases.getByUserId(user.id)).filter((c) => !c.is_hidden);
if (cases.length > 0) {
cases.sort((a, b) => {
return a.created_at < b.created_at ? 1 : -1;
});
const caseSummary = cases.slice(0, 3).map(c => {
const caseSummary = cases.slice(0, 3).map((c) => {
const summaryText = `${CaseTypes[c.type]} (#${c.case_number})`;
if (c.log_message_id) {