Current implementation will blast you with an unnecessary RickRoll if a user purposefully unsubscribes, waits 20 seconds, and then re-subscribes. Also, if the subcount increased by more than one then the program would unnecessarily wait 10 seconds between each roll. This will be a problem when you get a flood of subs all at once. To avoid a backlog of plays, let's just blast you all at once with a series of rolls.
Lastly, switch from using a list to a two-integer approach that tracks the current count and previous max. There is no need to continually append values to a subscriber count list - especially since we are in an infinite loop, so we risk consuming a lot of unnecessary memory this way.
Current implementation will blast you with an unnecessary RickRoll if a user purposefully unsubscribes, waits 20 seconds, and then re-subscribes. Also, if the subcount increased by more than one then the program would unnecessarily wait 10 seconds between each roll. This will be a problem when you get a flood of subs all at once. To avoid a backlog of plays, let's just blast you all at once with a series of rolls.
Lastly, switch from using a list to a two-integer approach that tracks the current count and previous max. There is no need to continually append values to a subscriber count list - especially since we are in an infinite loop, so we risk consuming a lot of unnecessary memory this way.