aboutsummaryrefslogtreecommitdiff
path: root/src/listeners
diff options
context:
space:
mode:
Diffstat (limited to 'src/listeners')
-rw-r--r--src/listeners/commands/commandError.ts6
-rw-r--r--src/listeners/guild/guildMemberAdd.ts2
-rw-r--r--src/listeners/message/automodUpdate.ts1
-rw-r--r--src/listeners/other/consoleListener.ts4
-rw-r--r--src/listeners/other/promiseRejection.ts2
5 files changed, 6 insertions, 9 deletions
diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts
index d24c0f0..bde74f0 100644
--- a/src/listeners/commands/commandError.ts
+++ b/src/listeners/commands/commandError.ts
@@ -30,7 +30,7 @@ export default class CommandErrorListener extends BushListener {
`${isSlash ? 'slashC' : 'c'}ommandError`,
`an error occurred with the <<${command}>> ${isSlash ? 'slash ' : ''}command in <<${channel}>> triggered by <<${
message?.author?.tag
- }>>:\n` + error?.stack || error,
+ }>>:\n${error?.stack}` || error,
false
);
@@ -115,9 +115,7 @@ export default class CommandErrorListener extends BushListener {
`**Error ${util.capitalizeFirstLetter(element)}:** ${
typeof (options.error as any)[element] === 'object'
? `[haste](${await util.inspectCleanRedactHaste((options.error as any)[element], inspectOptions)})`
- : '`' +
- util.discord.escapeInlineCode(util.inspectAndRedact((options.error as any)[element], inspectOptions)) +
- '`'
+ : `\`${util.discord.escapeInlineCode(util.inspectAndRedact((options.error as any)[element], inspectOptions))}\``
}`
);
}
diff --git a/src/listeners/guild/guildMemberAdd.ts b/src/listeners/guild/guildMemberAdd.ts
index e0a0426..ca10cd7 100644
--- a/src/listeners/guild/guildMemberAdd.ts
+++ b/src/listeners/guild/guildMemberAdd.ts
@@ -81,7 +81,7 @@ export default class GuildMemberAddListener extends BushListener {
if (failedRoles.length) {
void this.client.console.warn(
'guildMemberAdd',
- 'Failed assigning the following roles on Fallback:' + failedRoles
+ `Failed assigning the following roles on Fallback:${failedRoles}`
);
} else {
void this.client.console.info(
diff --git a/src/listeners/message/automodUpdate.ts b/src/listeners/message/automodUpdate.ts
index 2dd86a2..9ef229e 100644
--- a/src/listeners/message/automodUpdate.ts
+++ b/src/listeners/message/automodUpdate.ts
@@ -11,7 +11,6 @@ export default class AutomodMessageUpdateListener extends BushListener {
});
}
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
public override async exec(...[_, newMessage]: BushClientEvents['messageUpdate']): Promise<unknown> {
const fullMessage = newMessage.partial ? await newMessage.fetch() : (newMessage as BushMessage);
return await AutomodMessageCreateListener.automod(fullMessage);
diff --git a/src/listeners/other/consoleListener.ts b/src/listeners/other/consoleListener.ts
index c983a58..ef43726 100644
--- a/src/listeners/other/consoleListener.ts
+++ b/src/listeners/other/consoleListener.ts
@@ -1,5 +1,3 @@
-/* eslint-disable @typescript-eslint/no-var-requires */
-/* eslint-disable @typescript-eslint/no-unused-vars */
import { BushListener } from '@lib';
import { exec } from 'child_process';
import { promisify } from 'util';
@@ -14,6 +12,7 @@ export default class ConsoleListener extends BushListener {
public override async exec(line: string): Promise<void> {
if (line.startsWith('eval ') || line.startsWith('ev ')) {
+ /* eslint-disable @typescript-eslint/no-unused-vars */
const sh = promisify(exec),
bot = client,
config = client.config,
@@ -35,6 +34,7 @@ export default class ConsoleListener extends BushListener {
Util,
Collection
} = await import('discord.js');
+ /* eslint-enable @typescript-eslint/no-unused-vars */
try {
const input = line.replace('eval ', '').replace('ev ', '');
let output = eval(input);
diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts
index d60c9c7..8785b78 100644
--- a/src/listeners/other/promiseRejection.ts
+++ b/src/listeners/other/promiseRejection.ts
@@ -11,7 +11,7 @@ export default class PromiseRejectionListener extends BushListener {
public override async exec(error: Error): Promise<void> {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
- void client.console.error('promiseRejection', `An unhanded promise rejection occurred:\n${error?.stack ?? error}`, false);
+ void client.console.error('promiseRejection', `An unhanded promise rejection occurred:\n${error.stack ?? error}`, false);
void client.console.channelError({
embeds: [await CommandErrorListener.generateErrorEmbed({ type: 'unhandledRejection', error: error })]
});