MCPcopy Create free account
hub / github.com/ArrowM/Queue-Bot / verifyRequiredEnvironmentVariables

Function verifyRequiredEnvironmentVariables

src/utils/client.utils.ts:59–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 }
58
59 export function verifyRequiredEnvironmentVariables() {
60 // Required exist
61 [
62 "TOKEN",
63 "CLIENT_ID",
64 "DEFAULT_COLOR",
65 ].forEach(name => {
66 if (process.env[name] == null) {
67 throw new Error(`Required environment variable ${name} not set. Please edit .env file`);
68 }
69 });
70 // DEFAULT_COLOR is valid
71 if (!Object.keys(Color).includes(process.env.DEFAULT_COLOR as string)) {
72 throw new Error(`Invalid DEFAULT_COLOR value. Please edit .env file\nOptions: [${Object.keys(Color).join(", ")}]`);
73 }
74 }
75
76 export async function checkForPatchNotes() {
77 // Check if any patch notes have not been read

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected