Still got errors and warnings, mostly the same and easy to fix
diff --git a/src/utils/singleNotify.ts b/src/utils/singleNotify.ts
index f29d775..44bb2d0 100644
--- a/src/utils/singleNotify.ts
+++ b/src/utils/singleNotify.ts
@@ -1,29 +1,29 @@
-import client from './client.js';
+import client from "./client.js";
import EmojiEmbed from "./generateEmojiEmbed.js";
-let severities = {
+const severities = {
"Critical": "Danger",
"Warning": "Warning",
"Info": "Success"
-}
+};
export default async function(type: string, guild: string, message: string | true, severity?: string) {
- let data = await client.database.guilds.read(guild);
+ const data = await client.database.guilds.read(guild);
if (message === true) {
return await client.database.guilds.write(guild, {[`singleEventNotifications.${type}`]: false});
}
if (data.singleEventNotifications[type]) return;
await client.database.guilds.write(guild, {[`singleEventNotifications.${type}`]: true});
try {
- let channel = await client.channels.fetch(data.logging.staff.channel);
+ const channel = await client.channels.fetch(data.logging.staff.channel);
if (!channel) return;
await channel.send({embeds: [new EmojiEmbed()
.setTitle(`${severity} notification`)
.setDescription(message)
.setStatus(severities[severity])
.setEmoji("CONTROL.BLOCKCROSS")
- ]})
+ ]});
} catch (err) {
- console.error(err)
+ console.error(err);
}
}