Skip to content

🏀🔥🏀 LINE Bot that implemented FSM model with 9 features.

Notifications You must be signed in to change notification settings

chonyy/daily-nba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏀 The NBA LINE Bot with 9 features!

Watch NBA games, check the schedule, lookup the stats, search for players by using Daily-NBA. Button carousel templates are designed and implemented in every feature. Instead of directly typing the commands to the LINE bot, users can just simply press buttons on the carousel template to browse the features and access the NBA information!

There are four main componenets in this project

  • LINE Bot: Built by the official LINE Messaging API
  • Web Scraping: Use BeutifulSoup to scrape several websites to retrieve NBA information
  • Backend: Built the backend with Flask to handle the webhook
  • FSM: Create FSMs with pytransitions for the users state management

FSM

Finite State Machine is implemented for the state management of the users. A FSM is maintained for each individual user. This way, every user has their own independent state, and the operations between two different users will not affect each other.

Finite state machine is a model in Theory of Computation. This model is implemented in Daily-NBA. Each feature is represented by a state, and the button that user pressed on the carousel template will trigger the transitions between states. The FSM graph is drawn by GraphMachine in transitions.extensions.

Features

Watch Games

Checking out all the scores of the games on that day. (Today / Yesterday / Manually input date)

Search Player

Searching for a specific player. (Manually input player name)

Search Team

Searching for a specific team. (Manually input team name)

Standings

Showing the team standing from both Eastern and Western conference.

Game Schedule

Showing the game schedule tomorrow.

Stat Leader

Showing the stat leaders. (Most Points / Assist / Rebound / 3PM / Steal / Block)

Game Result

Checking out the box score of a specific game. (Manually input date and team)

Special Features

NBA Meme

My favoritie feature! Brininging the best and newest NBA meme to you by pressing one button.

NBA News

Bringing the hottest NBA news to you by pressing one button.

Play with it!

Reference

All data comes from basketball-reference.com.
NBA memes come from twitter@NBAMemes.
NBA news come from realgm.

License

MIT © chonyy

Demo

About

🏀🔥🏀 LINE Bot that implemented FSM model with 9 features.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages