aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-26 22:53:27 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-26 22:53:27 -0400
commit7990abdb511eeec2a114b124a3628b10bfefc342 (patch)
treec9cc92439bb0b8385e8fcd82c169fd6f86bb1974 /src/lib
parent80d5b5b11ae261945dc725a0a80115922003afcf (diff)
downloadtanzanite-7990abdb511eeec2a114b124a3628b10bfefc342.tar.gz
tanzanite-7990abdb511eeec2a114b124a3628b10bfefc342.tar.bz2
tanzanite-7990abdb511eeec2a114b124a3628b10bfefc342.zip
chore: add new eslint rule
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts6
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts12
-rw-r--r--src/lib/extensions/discord-akairo/BushInhibitor.ts2
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts2
-rw-r--r--src/lib/utils/BushLogger.ts2
5 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index c283eb9..10db18d 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -228,14 +228,14 @@ export class BushClient extends AkairoClient {
for (const loader of Object.keys(loaders)) {
try {
loaders[loader].loadAll();
- await this.logger.success('Startup', `Successfully loaded <<${loader}>>.`, false);
+ void this.logger.success('Startup', `Successfully loaded <<${loader}>>.`, false);
} catch (e) {
- await this.logger.error('Startup', `Unable to load loader <<${loader}>> with error:\n${e?.stack || e}`, false);
+ void this.logger.error('Startup', `Unable to load loader <<${loader}>> with error:\n${e?.stack || e}`, false);
}
}
await this.dbPreInit();
await UpdateCacheTask.init(this);
- this.console.success('Startup', `Successfully created <<cache>>.`, false);
+ void this.console.success('Startup', `Successfully created <<cache>>.`, false);
this.taskHandler.startAll();
}
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index 20fb468..ebac9eb 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -170,7 +170,7 @@ export class BushClientUtil extends ClientUtil {
const res: hastebinRes = await got.post(`${url}/documents`, { body: content }).json();
return `${url}/${res.key}`;
} catch {
- client.console.error('Haste', `Unable to upload haste to ${url}`);
+ void client.console.error('Haste', `Unable to upload haste to ${url}`);
}
}
return 'Unable to post';
@@ -681,7 +681,7 @@ export class BushClientUtil extends ClientUtil {
guild
});
const saveResult: ModLog = await modLogEntry.save().catch((e) => {
- client.console.error('createModLogEntry', e?.stack || e);
+ void client.console.error('createModLogEntry', e?.stack || e);
return null;
});
@@ -708,7 +708,7 @@ export class BushClientUtil extends ClientUtil {
? ActivePunishment.build({ user, type, guild, expires, modlog: options.modlog, extraInfo: options.extraInfo })
: ActivePunishment.build({ user, type, guild, expires, modlog: options.modlog });
return await entry.save().catch((e) => {
- client.console.error('createPunishmentEntry', e?.stack || e);
+ void client.console.error('createPunishmentEntry', e?.stack || e);
return null;
});
}
@@ -728,13 +728,13 @@ export class BushClientUtil extends ClientUtil {
// finding all cases of a certain type incase there were duplicates or something
where: { user, guild, type }
}).catch((e) => {
- client.console.error('removePunishmentEntry', e?.stack || e);
+ void client.console.error('removePunishmentEntry', e?.stack || e);
success = false;
});
if (entries) {
entries.forEach(async (entry) => {
await entry.destroy().catch((e) => {
- client.console.error('removePunishmentEntry', e?.stack || e);
+ void client.console.error('removePunishmentEntry', e?.stack || e);
});
success = false;
});
@@ -791,7 +791,7 @@ export class BushClientUtil extends ClientUtil {
public async automod(message: BushMessage) {
const autoModPhases = await message.guild.getSetting('autoModPhases');
- if (autoModPhases.includes(message.content.toString()) && message.deletable) message.delete();
+ if (autoModPhases.includes(message.content.toString()) && message.deletable) return await message.delete();
}
public capitalizeFirstLetter(string: string): string {
diff --git a/src/lib/extensions/discord-akairo/BushInhibitor.ts b/src/lib/extensions/discord-akairo/BushInhibitor.ts
index ae91494..f924458 100644
--- a/src/lib/extensions/discord-akairo/BushInhibitor.ts
+++ b/src/lib/extensions/discord-akairo/BushInhibitor.ts
@@ -10,6 +10,6 @@ export class BushInhibitor extends Inhibitor {
public exec(message: BushMessage, command: BushCommand): any;
public exec(message: BushMessage | BushSlashMessage, command: BushCommand): any {
- super.exec(message, command);
+ return super.exec(message, command);
}
}
diff --git a/src/lib/extensions/discord.js/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts
index 70feb90..142b766 100644
--- a/src/lib/extensions/discord.js/BushGuildMember.ts
+++ b/src/lib/extensions/discord.js/BushGuildMember.ts
@@ -94,7 +94,7 @@ export class BushGuildMember extends GuildMember {
true
)
.catch((e) => {
- client.console.error('warn', e, true, 1);
+ void client.console.error('warn', e, true, 1);
return { log: null, caseNum: null };
});
if (!result || !result.log) return { result: 'error creating modlog entry', caseNum: null };
diff --git a/src/lib/utils/BushLogger.ts b/src/lib/utils/BushLogger.ts
index d0c482f..e7532d8 100644
--- a/src/lib/utils/BushLogger.ts
+++ b/src/lib/utils/BushLogger.ts
@@ -8,7 +8,7 @@ import { BushClient, BushSendMessageType } from '../extensions/discord-akairo/Bu
export class BushLogger {
private client: BushClient;
public constructor(client: BushClient) {
- client = client;
+ this.client = client;
}
private parseFormatting(