Fix a bunch of linter errors
diff --git a/src/utils/eventScheduler.ts b/src/utils/eventScheduler.ts
index df46ca8..6923ede 100644
--- a/src/utils/eventScheduler.ts
+++ b/src/utils/eventScheduler.ts
@@ -2,13 +2,18 @@
import client from "./client.js";
import * as fs from "fs";
import * as path from "path";
-import config from "../config/main.json" assert {type: "json"};
+import config from "../config/main.json" assert { type: "json" };
class EventScheduler {
private agenda: Agenda;
constructor() {
- this.agenda = new Agenda({db: {address: config.mongoUrl + "Nucleus", collection: "eventScheduler"}});
+ this.agenda = new Agenda({
+ db: {
+ address: config.mongoUrl + "Nucleus",
+ collection: "eventScheduler"
+ }
+ });
this.agenda.define("unmuteRole", async (job) => {
const guild = await client.guilds.fetch(job.attrs.data.guild);
@@ -18,17 +23,31 @@
await job.remove();
});
this.agenda.define("deleteFile", async (job) => {
- fs.rm(path.resolve("dist/utils/temp", job.attrs.data.fileName), client._error);
+ fs.rm(
+ path.resolve("dist/utils/temp", job.attrs.data.fileName),
+ client._error
+ );
await job.remove();
});
this.agenda.define("naturalUnmute", async (job) => {
- const { log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
+ const { log, NucleusColors, entry, renderUser, renderDelta } =
+ client.logger;
const guild = await client.guilds.fetch(job.attrs.data.guild);
const user = await guild.members.fetch(job.attrs.data.user);
if (user.communicationDisabledUntil === null) return;
- try { await client.database.history.create(
- "unmute", user.guild.id, user.user, null, null, null, null
- );} catch (e) { client._error(e); }
+ try {
+ await client.database.history.create(
+ "unmute",
+ user.guild.id,
+ user.user,
+ null,
+ null,
+ null,
+ null
+ );
+ } catch (e) {
+ client._error(e);
+ }
const data = {
meta: {
type: "memberUnmute",
@@ -41,7 +60,10 @@
list: {
memberId: entry(user.user.id, `\`${user.user.id}\``),
name: entry(user.user.id, renderUser(user.user)),
- unmuted: entry(new Date().getTime(), renderDelta(new Date().getTime())),
+ unmuted: entry(
+ new Date().getTime(),
+ renderDelta(new Date().getTime())
+ ),
unmutedBy: entry(null, "*Time out ended*")
},
hidden: {
@@ -53,7 +75,7 @@
}
async start() {
- await new Promise(resolve => this.agenda.once("ready", resolve));
+ await new Promise((resolve) => this.agenda.once("ready", resolve));
this.agenda.start();
return this;
}
@@ -65,8 +87,8 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any
cancel(name: string, data: any) {
- this.agenda.cancel({name, data});
+ this.agenda.cancel({ name, data });
}
}
-export default EventScheduler;
\ No newline at end of file
+export default EventScheduler;