Add environment variables checker
This commit is contained in:
parent
e6e708d427
commit
42ed897b87
1 changed files with 8 additions and 0 deletions
|
@ -25,4 +25,12 @@ export async function setupEnv() {
|
|||
} catch (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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue