ville-solja / kukkohelper

Kylmät kukot discord bot
3 stars 1 forks source link

Streamer notification cooldown period #19

Closed ville-solja closed 5 years ago

ville-solja commented 5 years ago

Currently user status compare is unreliable and needs to "remember" previously announced streamers and give a grace period before new announcement will be done.

Solution:

  1. Create global streamers list
  2. on_member_update should call a function to see if user exists in list 2.1 If user doesn't exist already they should be added and bool value returned that enables the announcement 2.2 If they already exist no action is done
  3. Separate function to add name and timestamp information to streamers dict
  4. Separate function that checks if streamers dict entries are old enough to delete 4.1 This should not work as sleep in order to allow other async operations to run