Score Search is a Discord Bot created by @TylerJenningsW and @MichaelLillis using TypeScript, Puppeteer for web scraping, and Discord.JS as a Discord API wrapper.
NOTE: This project is meant to be a learning experience, as both authors had limited knowledge of TypeScript and Puppeteer going into the project.
The Score Search Discord bot allows you and your friends to look at live or past sports scores. By using the commands given below, the bot automatically goes to the chosen site (ESPN or Google), searches the game or team you've chosen, and screenshots the game and stats for the whole discord to see. The perfect tool for trash talking on a Football Sunday ;)
Run the following commands in terminal/command prompt:
yarn install
• Insert your discord bot token and your server id into the .env
yarn build
yarn start
• Fork this repo to your github
• Create a new app on heroku
• Under Resources enable the yarn start worker, and disable web
• Under Settings reveal config vars, then insert your token, application id, and guild id.
• Then, set your buildpacks to the following:
heroku/nodejs
jontewks/puppeteer
• Under deploy connect your Github account and connect the repo
• Enable automatic deploys
/Score espn [team name(s)]
/Score google [team name(s)]
• The scraper searches on Google with the input you give it, attempts to find the box score of the given game, and takes a screenshot to post back to the Discord channel.
• Since our web scraper searches through Google, you can make the Search as specific as you'd like it to be!
• If your search fails with the site you've chosen (ESPN or Google), it will attempt the search on the opposing site as well.
• We adjusted the CSS before the screenshot takes place to allow for clear and relevant information/statistics to display.
• Speeds can range from 3-5 seconds (command to bot response)!