From 86ccca98406aab35ad7ec0758794ad77407d3b0a Mon Sep 17 00:00:00 2001 From: Nico Jensen Date: Mon, 31 Jan 2022 17:56:47 +0100 Subject: [PATCH] add error handling --- src/deploy-commands.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/deploy-commands.js b/src/deploy-commands.js index ee9415d..096115a 100644 --- a/src/deploy-commands.js +++ b/src/deploy-commands.js @@ -14,4 +14,5 @@ commandFiles.forEach(commandFile => { const restClient = new REST({version: "9"}).setToken(process.env.DISCORD_BOT_TOKEN) restClient.put(Routes.applicationGuildCommands(process.env.DISCORD_APPLICATION_ID, process.env.DISCORD_GUILD_ID), {body: commands}) -.then(() => console.log("Successully registerd commands")) \ No newline at end of file +.then(() => console.log("Successully registerd commands")) +.catch(console.error) \ No newline at end of file