if (!process.env.WORKER_CONNECTION_STRING) throw new Error("WORKER_CONNECTION_STRING was missing from env"); if (!process.env.POSTGREST_URL) throw new Error('Missing POSTGREST_URL env var'); if (!process.env.DISCORD_TOKEN) throw new Error('Missing DISCORD_TOKEN env var'); if (!process.env.DISCORD_CHANNEL_ID) throw new Error("DISCORD_CHANNEL_ID was missing from env"); if (!process.env.DISCORD_GUILD_ID) throw new Error("DISCORD_GUILD_ID was missing from env"); if (!process.env.DISCORD_APPLICATION_ID) throw new Error('DISCORD_APPLICATION_ID was missing from env'); if (!process.env.AUTOMATION_USER_JWT) throw new Error('Missing AUTOMATION_USER_JWT env var'); const token = process.env.DISCORD_TOKEN! const postgrestUrl = process.env.POSTGREST_URL! const discordChannelId = process.env.DISCORD_CHANNEL_ID! const discordGuildId = process.env.DISCORD_GUILD_ID! const automationUserJwt = process.env.AUTOMATION_USER_JWT! const connectionString = process.env.WORKER_CONNECTION_STRING! const discordApplicationId = process.env.DISCORD_APPLICATION_ID! export interface Config { token: string; postgrestUrl: string; automationUserJwt: string; discordGuildId: string; discordChannelId: string; connectionString: string; discordApplicationId: string; } export const configs: Config = { token, postgrestUrl, automationUserJwt, discordGuildId, discordChannelId, connectionString, discordApplicationId, }