We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b05e2a5 commit 48f31b9Copy full SHA for 48f31b9
1 file changed
src/env.ts
@@ -14,6 +14,14 @@ function requireEnv(key: string): string {
14
return value;
15
}
16
17
+function useDevEnv(key: string): string | undefined {
18
+ const isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
19
+ if (isDev) {
20
+ return optionalEnv(key);
21
+ }
22
+ return undefined;
23
+}
24
+
25
// Single source of truth for all configuration
26
export const config = {
27
discord: {
@@ -33,6 +41,9 @@ export const config = {
33
41
channelId: requireEnv('GUIDES_CHANNEL_ID'),
34
42
trackerPath: optionalEnv('GUIDES_TRACKER_PATH'),
35
43
},
44
+ roleIds: {
45
+ examleRole: useDevEnv('EXAMPLE_ROLE_ID') ?? '12345',
46
+ },
36
47
// Add more config sections as needed:
37
48
// database: {
38
49
// url: requireEnv('DATABASE_URL'),
0 commit comments