Hello there!
I'm currently working on a song rater (where any person can do a !rate and the bot will write the number down for each song/person).

The only problem that I yet face is, that I want to see the values, so I can pull the average. I already have the line part down, so all that is left to do is count how many 1's, 2's (etc.) are in the file/song.

The file looks like that:

[Song]
$nick = value
$othernick = othervalue
[song]
$nick = otherothervalue

(I guess you can imagine the rest.)

Could you tell me how I can retrieve the amount of 1's/2's (etc.) or maybe even how I can retrieve all the values at once?


Thanks in advance!


Streaming games on Twitch, while guiding and helping other players!
www.twitch.tv/vijoplays