A bot that tracks stats for the Henri Challenge.
Before doing anything, you will have to get your local version of the bot (you will need both nodeJS and git). Then :
git clone https://github.com/amnezziaa/HenriBot.git
cd ./HenriBot/
npm ci
You can follow this page from the discord JS documentation.
You can follow this tutorial from the google sheets API documentation.
Don't forget to download your credentials.json
file from the API and paste in here.
Note that later on when launching the bot for the first time, you will be required to link an account. This is because the bot needs certain permissions to your account. But for this to work, you'll need to add your google mail to the OAuth consent screen of the app.
You will need these values :
DISCORD_BOT_ID
: From the discord application page.DISCORD_TOKEN
: From the discord application page.SHEET_ID
: The literal ID of your sheet URL.SHEET_STARING_DATE
: The date the sheet starts at, formats like :YYYY/MM/DD
, value from the sheet and in.env
should be identical.
Once acquired, fill in the example.env
file and rename it to .env
.
Keep in mind that the current setup only works because of my specific sheet organisation and values.
In fact, the commands are made in the way I designed the bot and google sheet in the first place. If you want the bot to work your way, you will have to either copy my entire sheet setup or create your own and therefore modify the code.