Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 2.89 KB

readme.md

File metadata and controls

63 lines (39 loc) · 2.89 KB

HenriBot 🍩

A bot that tracks stats for the Henri Challenge.

Resources

Setup

Git clone

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/AmnezziaCS/HenriBot.git
cd ./HenriBot/
npm ci

Create your discord bot

You can follow this page from the discord JS documentation.

Create your google sheet app

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.

Fill in the .env file

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.

Final notice

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.

Documentation

Discord JS

Google Sheet API