From f0c77bed3cc5955ea8f16a82e1b5fb427f821721 Mon Sep 17 00:00:00 2001 From: fullgream Date: Wed, 15 Oct 2025 07:33:56 +0300 Subject: [PATCH] Add check of envirmoment --- src/bot.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bot.js b/src/bot.js index dd804d1..b076dbc 100644 --- a/src/bot.js +++ b/src/bot.js @@ -33,6 +33,11 @@ config.whitelist = Object.keys( ).map((x) => +x); console.info(config); +if (!process.env.BOT_TOKEN) { + throw new Error( + "BOT_TOKEN not defined. Please, run docker container: docker run --env-file .env", + ); +} config.admins = Object.fromEntries(config.admins.map((x) => [x, true])); config.whitelist = Object.fromEntries(config.whitelist.map((x) => [x, true]));