diff --git a/.env.example b/.env.example index ed867e7..62cfd5b 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,6 @@ DISCORD_TOKEN= REDIS_URL=redis://127.0.0.1:6379 -FIREBASE_PROJECT_ID= -FIREBASE_CLIENT_EMAIL= -FIREBASE_PRIVATE_KEY= +FIREBASE_CREDENTIALS_PATH= TWITCH_CLIENT_ID= TWITCH_CLIENT_SECRET= TWITCH_SUBSCRIPTION_SECRET= diff --git a/src/bot.ts b/src/bot.ts index 9ade9e4..301a1c4 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -30,14 +30,7 @@ dayjs.extend(relativeTime); dayjs.extend(dayjsParser); initializeApp({ - credential: cert({ - projectId: process.env.FIREBASE_PROJECT_ID, - clientEmail: process.env.FIREBASE_CLIENT_EMAIL, - privateKey: Buffer.from( - process.env.FIREBASE_PRIVATE_KEY ?? '', - 'base64', - ).toString('utf-8'), - }), + credential: cert(process.env.FIREBASE_CREDENTIALS_PATH ?? ''), }); container.database = getFirestore();