catch my errors sis
This commit is contained in:
parent
a26c05c69e
commit
36c05556e5
1 changed files with 2 additions and 11 deletions
13
src/index.ts
13
src/index.ts
|
|
@ -1,21 +1,11 @@
|
||||||
import config from "../config.json" with {type: "json"};
|
import config from "../config.json" with {type: "json"};
|
||||||
import {
|
import {
|
||||||
ActionRow,
|
|
||||||
ActionRowBuilder,
|
|
||||||
Application,
|
|
||||||
ApplicationIntegrationType,
|
|
||||||
ButtonBuilder,
|
|
||||||
ButtonStyle,
|
|
||||||
Client,
|
Client,
|
||||||
EmbedBuilder,
|
|
||||||
Events,
|
Events,
|
||||||
GatewayIntentBits,
|
GatewayIntentBits,
|
||||||
InteractionContextType,
|
|
||||||
REST,
|
REST,
|
||||||
Routes,
|
Routes,
|
||||||
SlashCommandBuilder
|
|
||||||
} from "discord.js";
|
} from "discord.js";
|
||||||
import { getSongOnPreferredProvider } from "./helper.ts";
|
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { Command } from "./command.ts";
|
import { Command } from "./command.ts";
|
||||||
|
|
@ -65,7 +55,8 @@ client.on(Events.InteractionCreate, async (interaction) => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await command.run(interaction, config);
|
await command.run(interaction, config);
|
||||||
} catch {
|
} catch (e) {
|
||||||
|
console.error("error during command execution: " + commandName, e )
|
||||||
interaction.reply("something sharted itself")
|
interaction.reply("something sharted itself")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue