aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/listeners/commands')
-rw-r--r--src/listeners/commands/commandError.ts6
-rw-r--r--src/listeners/commands/commandStarted.ts2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts
index 0e84571..36a482d 100644
--- a/src/listeners/commands/commandError.ts
+++ b/src/listeners/commands/commandError.ts
@@ -39,7 +39,7 @@ export default class CommandErrorListener extends BushListener {
`Oh no! While running the command \`${command.id}\`, an error occurred. Please give the developers code \`${errorNo}\`.`
);
await message.util.send({ embeds: [errorUserEmbed] }).catch((e) => {
- const channel = message.channel.type === 'dm' ? message.channel.recipient.tag : message.channel.name;
+ const channel = message.channel.type === 'DM' ? message.channel.recipient.tag : message.channel.name;
this.client.console.warn('CommandError', `Failed to send user error embed in <<${channel}>>:\n` + e?.stack || e);
});
} else {
@@ -49,12 +49,12 @@ export default class CommandErrorListener extends BushListener {
.setTimestamp()
.setDescription(await this.client.util.codeblock(`${error?.stack || error}`, 2048, 'js'));
await message.util.send({ embeds: [errorDevEmbed] }).catch((e) => {
- const channel = message.channel.type === 'dm' ? message.channel.recipient.tag : message.channel.name;
+ const channel = message.channel.type === 'DM' ? message.channel.recipient.tag : message.channel.name;
this.client.console.warn('CommandError', `Failed to send owner error stack in <<${channel}>>.` + e?.stack || e);
});
}
}
- const channel = message.channel.type === 'dm' ? message.channel.recipient.tag : message.channel.name;
+ const channel = message.channel.type === 'DM' ? message.channel.recipient.tag : message.channel.name;
this.client.console.error(
'CommandError',
`an error occurred with the <<${command}>> command in <<${channel}>> triggered by <<${message?.author?.tag}>>:\n` +
diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts
index 4f8c13c..ba1af42 100644
--- a/src/listeners/commands/commandStarted.ts
+++ b/src/listeners/commands/commandStarted.ts
@@ -12,7 +12,7 @@ export default class CommandStartedListener extends BushListener {
this.client.logger.info(
'Command',
`The <<${command.id}>> command was used by <<${message.author.tag}>> in ${
- message.channel.type === 'dm' ? `their <<DMs>>` : `<<#${message.channel.name}>> in <<${message.guild?.name}>>`
+ message.channel.type === 'DM' ? `their <<DMs>>` : `<<#${message.channel.name}>> in <<${message.guild?.name}>>`
}.`,
true //// I don't want to spam the log channel when people use commands
);