From 37546405e204cbc73429cedae80d144a88156a8c Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Tue, 29 Aug 2023 15:22:21 +0200 Subject: [PATCH] fix: exit script if env vars not provided --- src/utils/deploySlashCommands.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/deploySlashCommands.ts b/src/utils/deploySlashCommands.ts index e3de23a7..dcab3436 100644 --- a/src/utils/deploySlashCommands.ts +++ b/src/utils/deploySlashCommands.ts @@ -41,6 +41,7 @@ const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_BOT_TOKEN) logger.error( 'Missing required environment variables for deployment.\nPlease provide valid DISCORD_APPLICATION_ID and DISCORD_BOT_TOKEN in .env file.' ); + process.exit(1); } for (const folder of commandFolders) {