GithubHelp home page GithubHelp logo

iplstats's Introduction

🔥IPL Stats 2021 Season (Discord Bot)🔥

IPLStats

Follow @arnab1729

Description

This bot will give quick and brief updates regarding the IPL 2020. It can display the standings, schedule, live scores, and player stats.

Deploy your discord bot

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.

Deploy

Usage

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

help

$upcoming

upcoming

$live

live

$standings

standings

$player

player

Technologies Used:

  1. Discord.js : For making the discord bot
  2. Axios : For fetching data
  3. 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

iplstats's People

Contributors

arnabsen1729 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iplstats's Issues

Player Stats

Sorry for interupting but when i try to search a player it comes as Sorry Something went wrong. When i checked in heroku log i got this :
TypeError: Cannot read property '0' of undefined
at getPlayerStats (/app/src/dataFetch.js:58:35)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

having problem with npm run dev

Whenever i do npm run dev on my terminal it gives the following error ->

[email protected] dev C:\Users\dev\Downloads\IPL-bot\IPLStats-master
nodemon ./src/bot.js

'nodemon' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: nodemon ./src/bot.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dev\AppData\Roaming\npm-cache_logs\2021-04-19T15_42_58_288Z-debug.log

having problem while deploying to heroku

when i clicked on deploy to heroku it redirected me to heroku adn there this error appeared ->

The content of app.json is not valid; please see app.json Schema for more information.

The file does not contain a valid JSON entity.

Still same

Doesn't show any live matches when doing live command

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.