add error handling

This commit is contained in:
Nico Jensen 2022-01-31 17:56:47 +01:00
parent 45e016e9c3
commit 86ccca9840

View File

@ -14,4 +14,5 @@ commandFiles.forEach(commandFile => {
const restClient = new REST({version: "9"}).setToken(process.env.DISCORD_BOT_TOKEN) 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), restClient.put(Routes.applicationGuildCommands(process.env.DISCORD_APPLICATION_ID, process.env.DISCORD_GUILD_ID),
{body: commands}) {body: commands})
.then(() => console.log("Successully registerd commands")) .then(() => console.log("Successully registerd commands"))
.catch(console.error)