Add check of envirmoment
This commit is contained in:
parent
d5ca761aeb
commit
f0c77bed3c
@ -33,6 +33,11 @@ config.whitelist = Object.keys(
|
|||||||
).map((x) => +x);
|
).map((x) => +x);
|
||||||
|
|
||||||
console.info(config);
|
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.admins = Object.fromEntries(config.admins.map((x) => [x, true]));
|
||||||
config.whitelist = Object.fromEntries(config.whitelist.map((x) => [x, true]));
|
config.whitelist = Object.fromEntries(config.whitelist.map((x) => [x, true]));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user