This bot will give quick and brief updates regarding the IPL 2020. It can display the standings, schedule, live scores, and player stats.
First you need to create a CricApi account and get the API key. Go to https://www.cricapi.com/ website, register for the free plan.
The free plan gives 100 requests per day. But, since the schedule is prefetched, and the standings are scraped from the official IPL website, the number of requests are reduced.
STEP 1: Create a Discord Bot Account. This bot doesn't need any extra permissions, just a bot role is enough. For a guide refer to this.
STEP 2: Create a Cricapi account, and get the API Key.
Don't share the API keys and the Discord BOT TOKEN with anyone. Keep them in the .env file.
STEP 3(Optional): If you have node installed then you can run the app locally and test it out once, for that just do these
$ npm i # to install node modules
$ npm run dev # will start the bot and your bot will be online
STEP 4: Click on the deploy to heroku button. Make sure you configure the API keys in Heroku Settings as well.
Every command given to the bot should be prefixed by $
.
IPL Notifs Commands:-
upcoming: Schedule of all upcoming IPL matches(at most 6)
live: Live Score
standings: Current Standings
player: Player Info e.g $player Patt Cummins
These are the previews:-
$help
$upcoming
$live
$standings
$player
- Discord.js : For making the discord bot
- Axios : For fetching data
- Cheerio : For scraping the IPL standings from the official website
For the other datas I have used the Cricapi. They have a really nice collection of cricket related APIs