From 36c05556e5cfa3a6da12f01396588d96e9db5052 Mon Sep 17 00:00:00 2001 From: amy Date: Sat, 22 Feb 2025 18:24:58 +0330 Subject: [PATCH] catch my errors sis --- src/index.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/index.ts b/src/index.ts index af63872..d00b4c7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,21 +1,11 @@ import config from "../config.json" with {type: "json"}; import { - ActionRow, - ActionRowBuilder, - Application, - ApplicationIntegrationType, - ButtonBuilder, - ButtonStyle, Client, - EmbedBuilder, Events, GatewayIntentBits, - InteractionContextType, REST, Routes, - SlashCommandBuilder } from "discord.js"; -import { getSongOnPreferredProvider } from "./helper.ts"; import path from "node:path"; import fs from "node:fs"; import { Command } from "./command.ts"; @@ -65,7 +55,8 @@ client.on(Events.InteractionCreate, async (interaction) => { try { await command.run(interaction, config); - } catch { + } catch (e) { + console.error("error during command execution: " + commandName, e ) interaction.reply("something sharted itself") }