Add check of envirmoment

This commit is contained in:
fullgream 2025-10-15 07:33:56 +03:00
parent d5ca761aeb
commit f0c77bed3c

View File

@ -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 <params> <container> --env-file .env",
);
}
config.admins = Object.fromEntries(config.admins.map((x) => [x, true]));
config.whitelist = Object.fromEntries(config.whitelist.map((x) => [x, true]));