Skip to content

Commit f88f713

Browse files
committed
error handler
1 parent 3e196dd commit f88f713

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ts-bot-ramework
1+
# ts-bot-framework
22

33
To install dependencies:
44

src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ client.on("ready", () => {
3737
client.on("interactionCreate", async (interaction) => {
3838
if (interaction.isCommand()) {
3939
console.log(`Received command: ${interaction.commandName}`);
40-
await handleCommand(interaction);
40+
try {
41+
await handleCommand(interaction);
42+
} catch (e) {
43+
console.error(e);
44+
}
4145
}
4246
if (interaction.isButton()) {
4347
console.log(`Received button: ${interaction.customId}`);

0 commit comments

Comments
 (0)