Pre reqs
1. Firestore database
We use Firebase to persist preferences between runs. Witout it you wont be able to use any features that rely on get/set/unsetPref
functions (like the announcer)
Creating the credentials
Skip this step if you already have the credential file in hand
- Go to the Firebase homepage
- Select or create a new firebase project
- Create a new Firestore database (if needed)
- Navigate to Firestore Database from the side menu
- Click Create database, select production mode and then select the region closer to the final host of the bot
- Generate the credentials
- Under Project settings > Service Accounts, click Generate new private key
- Confirm by clicking Generate key. A
.json
file will be downloaded to your computer.
Loading the credentials
- Move the aforementioned
.json
file to a non-versioned directory on your computer. I suggest using the var/
folder of the application itself.
- Create a new environment variable with the full path of the file like so:
# .env
GOOGLE_APPLICATION_CREDENTIALS=/full/path/to/file/abc123.json