mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: user error discrimination
This commit is contained in:
1 parent
f9e0584f00
commit
4b00e1342e
11 files changed
+49
-51
No files matched your search
@@ -7,10 +7,11 @@ import {
|
||||
} from 'discord.js';
|
||||
import { commands } from '..';
|
||||
import discord from '../../../../discord.json' assert { type: 'json' };
|
||||
import { psa } from '../../../core/discord/psa';
|
||||
import { UserError } from '../../../core/blitzkrieg/userError';
|
||||
import embedNegative from '../../../core/discord/embedNegative';
|
||||
import embedWarning from '../../../core/discord/embedWarning';
|
||||
import normalizeInteractionReturnable from '../../../core/discord/normalizeInteractionReturnable';
|
||||
import { psa } from '../../../core/discord/psa';
|
||||
|
||||
export default async function handleChatInputCommand(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
@@ -53,7 +54,9 @@ export default async function handleChatInputCommand(
|
||||
.setStyle(ButtonStyle.Link),
|
||||
);
|
||||
|
||||
console.error(interaction.commandName, error);
|
||||
if (!(error instanceof UserError)) {
|
||||
console.error(interaction.commandName, error);
|
||||
}
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
|
||||
Reference in new issue
Block a user