Add environment variables checker

This commit is contained in:
Sudo Space 2024-08-31 17:10:01 +03:30
parent e6e708d427
commit 42ed897b87

View file

@ -25,4 +25,12 @@ export async function setupEnv() {
} catch (err) { } catch (err) {
console.log(err); console.log(err);
} }
if (!process.env.token) {
console.log("Bot token is not exist in the config file.");
process.exit(1);
}
if (!process.env.admin) {
console.log("Bot admin id is not not exist in the config file.");
process.exit(1);
}
} }