Fix a bunch of linter errors
diff --git a/src/commands/server/about.ts b/src/commands/server/about.ts
index c0a2ede..0a1cc6f 100644
--- a/src/commands/server/about.ts
+++ b/src/commands/server/about.ts
@@ -3,48 +3,84 @@
import { WrappedCheck } from "jshaiku";
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import getEmojiByName from "../../utils/getEmojiByName.js";
-import generateKeyValueList, { toCapitals } from "../../utils/generateKeyValueList.js";
+import generateKeyValueList, {
+ toCapitals
+} from "../../utils/generateKeyValueList.js";
import client from "../../utils/client.js";
-const command = (builder: SlashCommandSubcommandBuilder) => builder
- .setName("about")
- .setDescription("Shows info about the server");
+const command = (builder: SlashCommandSubcommandBuilder) =>
+ builder.setName("about").setDescription("Shows info about the server");
const callback = async (interaction: CommandInteraction): Promise<void> => {
- const guild = interaction.guild as Guild;
+ const guild = interaction.guild!;
const { renderUser, renderDelta } = client.logger;
- interaction.reply({embeds: [new EmojiEmbed()
- .setTitle("Server Info")
- .setStatus("Success")
- .setEmoji("GUILD.GREEN")
- .setDescription(
- generateKeyValueList({
- "name": guild.name,
- "id": `\`${guild.id}\``,
- "owner": `${renderUser((await guild.fetchOwner()).user)}`,
- "created": `${renderDelta(guild.createdTimestamp)}`,
- "emojis": `${guild.emojis.cache.size}` + (guild.emojis.cache.size > 1 ? `\n> ${
- guild.emojis.cache.first(10).map((emoji) => `<${emoji.animated ? "a" : ""}:${emoji.name}:${emoji.id}>`).join(" ")
- }` +
- (guild.emojis.cache.size > 10 ? ` and ${guild.emojis.cache.size - 10} more` : "") : ""),
- "icon": `[Discord](${guild.iconURL()})`,
- "2 factor authentication": `${guild.mfaLevel === "NONE" ? `${getEmojiByName("CONTROL.CROSS")} No` : `${getEmojiByName("CONTROL.TICK")} Yes`}`,
- "verification level": `${toCapitals(guild.verificationLevel)}`,
- "explicit content filter": `${toCapitals(guild.explicitContentFilter.toString().replace(/_/, " " ))}`,
- "nitro boost level": `${guild.premiumTier !== "NONE" ? guild.premiumTier.toString()[-1] : "0"}`,
- "channels": `${guild.channels.cache.size}`,
- "roles": `${guild.roles.cache.size}`,
- "members": `${guild.memberCount}`
- })
- )
- .setThumbnail(guild.iconURL({dynamic: true}))
- ], ephemeral: true});
+ interaction.reply({
+ embeds: [
+ new EmojiEmbed()
+ .setTitle("Server Info")
+ .setStatus("Success")
+ .setEmoji("GUILD.GREEN")
+ .setDescription(
+ generateKeyValueList({
+ name: guild.name,
+ id: `\`${guild.id}\``,
+ owner: `${renderUser((await guild.fetchOwner()).user)}`,
+ created: `${renderDelta(guild.createdTimestamp)}`,
+ emojis:
+ `${guild.emojis.cache.size}` +
+ (guild.emojis.cache.size > 1
+ ? `\n> ${guild.emojis.cache
+ .first(10)
+ .map(
+ (emoji) =>
+ `<${emoji.animated ? "a" : ""}:${
+ emoji.name
+ }:${emoji.id}>`
+ )
+ .join(" ")}` +
+ (guild.emojis.cache.size > 10
+ ? ` and ${
+ guild.emojis.cache.size - 10
+ } more`
+ : "")
+ : ""),
+ icon: `[Discord](${guild.iconURL()})`,
+ "2 factor authentication": `${
+ guild.mfaLevel === "NONE"
+ ? `${getEmojiByName("CONTROL.CROSS")} No`
+ : `${getEmojiByName("CONTROL.TICK")} Yes`
+ }`,
+ "verification level": `${toCapitals(
+ guild.verificationLevel
+ )}`,
+ "explicit content filter": `${toCapitals(
+ guild.explicitContentFilter
+ .toString()
+ .replace(/_/, " ")
+ )}`,
+ "nitro boost level": `${
+ guild.premiumTier !== "NONE"
+ ? guild.premiumTier.toString()[-1]
+ : "0"
+ }`,
+ channels: `${guild.channels.cache.size}`,
+ roles: `${guild.roles.cache.size}`,
+ members: `${guild.memberCount}`
+ })
+ )
+ .setThumbnail(guild.iconURL({ dynamic: true }))
+ ],
+ ephemeral: true
+ });
};
-const check = (_interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+const check = (
+ _interaction: CommandInteraction,
+ _defaultCheck: WrappedCheck
+) => {
return true;
};
export { command };
export { callback };
-export { check };
\ No newline at end of file
+export { check };