To display number of viewers and make a statistics of it, we need to create real-time user list, which will contain every user that in that moment in the chat. It will help to display real-time numbers, graphs and etc. Also, in the future will be added new feature that will store data about every bot session in separate file, it will help to track statistics for a long period.
Implementation
Create RealTimeUserData class, that will be a singleton and store every user that in the chat
Handle JOIN and PART messages from twitch to update user list
Description
To display number of viewers and make a statistics of it, we need to create real-time user list, which will contain every user that in that moment in the chat. It will help to display real-time numbers, graphs and etc. Also, in the future will be added new feature that will store data about every bot session in separate file, it will help to track statistics for a long period.
Implementation