Skip to content

Commit

Permalink
Add back envs.s file
Browse files Browse the repository at this point in the history
  • Loading branch information
diksipav committed Aug 1, 2024
1 parent 202acac commit 1d4fc0d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions app/envs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
if (!process.env.DISCORD_CLIENT_ID) {
throw new Error("DISCORD_CLIENT_ID env var not configured");
}
export const discordClientId = process.env.DISCORD_CLIENT_ID;

if (!process.env.DISCORD_CLIENT_PUBLIC_KEY) {
throw new Error("DISCORD_CLIENT_PUBLIC_KEY env var not configured");
}
export const discordClientPublicKey = process.env.DISCORD_CLIENT_PUBLIC_KEY;

if (!process.env.DISCORD_TOKEN) {
throw new Error(`DISCORD_TOKEN env var not configured`);
}
export const discordToken = process.env.DISCORD_TOKEN;

if (!process.env.DISCORD_GUILD_ID) {
throw new Error("DISCORD_GUILD_ID env var not configured");
}
export const discordGuildId = process.env.DISCORD_GUILD_ID;

if (!process.env.DISCORD_MODERATION_ACCESS_ROLES) {
throw new Error("DISCORD_MODERATION_ACCESS_ROLES env var not configured");
}
export const authorizedRoleIds =
process.env.DISCORD_MODERATION_ACCESS_ROLES.split(",");

if (!process.env.REVIEW_CHANNEL_ID) {
throw new Error("REVIEW_CHANNEL_ID env var not configured");
}
export const reviewChannelId = process.env.REVIEW_CHANNEL_ID;

0 comments on commit 1d4fc0d

Please sign in to comment.