Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/maybeanerd/MagiBot. MagiBot - the community building discord bot that adds joinsounds to your voice discord.gg/2Evcf4T
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637import dotenv from 'dotenv';import path from 'path';
dotenv.config(); // load .env into environment
const token = process.env.TOKEN;const appId = process.env.APP_ID;const owner = process.env.OWNERID;const dburl = process.env.DATABASE_URL;const posthogApiKey = process.env.POSTHOG_API_KEY;let blapis: { [listname: string]: string;};
try { // eslint-disable-next-line import/no-dynamic-require, global-require blapis = require(path.join(__dirname, '..', 'botlistTokens.json')); console.info('Found botlist tokens:', Object.keys(blapis));} catch (e) { // eslint-disable-next-line no-console console.warn('No bot list tokens found, defaulting to none'); blapis = {};}
if (!(token && owner && dburl && appId)) { throw new Error('Missing .env configuration!');}
export default { tk: token, owner, dburl, blapis, appId, posthogApiKey,};