-
Notifications
You must be signed in to change notification settings - Fork 2
SongRanking Behavior
This Behavior is a small add-on to Grabber that allows users to add a personal score (likeability) to songs in the index using !song like
or by reacting to messages containing song sources or song hashes.
A user can choose one of five degrees of likeability toward each index entry:
- Love / ❤️ / 2 - I really like this song and want to listen to it frequently.
- Like / 👍 / 1 - This song is OK/good. [default]
- Neutral / ❔ / 0 - No opinion (usually not saved in the index; represented by the absence of a score)
- Dislike / 😩 / -1 - This song is bad/I'd rather not listen to it.
- Hate / 🤢 / -2 - I hate this song and absolutely refuse to listen to it.
When a new song is grabbed, the user who shared the song is automatically assigned a score of 1 toward that song, which can later be changed. Any other users can assign the song their own likeability value.
Likeability can be assigned or replaced to a song in two different ways:
-
React on Discord to a message containing song sources or to a Rowboat message contaning index hashes. You can react with one of the emoji listed above or with one of more than 80 supported basic emoji in order to set the appropriate likeability level on the song (the supported emoji are intended to be "intuitive"). Note that if you react with a neutral emoji, you will be removing likeability instead, which has additional caveats (see below).
-
Use the
!song like HASH [LIKEABILITY]
command. IfLIKEABILITY
is not provided 1 will be assumed. You can proactively pass 0 to remove likeability instead, which has its additional caveats (see below).
In addition to passing the LIKEABILITY
parameter of this command as a number between -2 and 2, you can also pass it as a word, such as love, like, remove, dislike or hate. More than 30 words are supported and will be converted into an appropriate likeability level (the supported words are intended to be "intuitive").
When setting your likeability of a song to 0 or reacting with a neutral emoji, you will be attempting to remove your previously assigned likeability from the index. This operation is only permitted if the allowRemoval
parameter is set to true
.
However, if preventLastRemoval
is set to true (which is the default), users can only remove their opinion of a song if at least one more user has assigned their own opinion, preventing songs from becoming "orphaned". In this case, if the user's opinion is the only opinion assigned to the song in the index, the removal operation will be ignored.
SongRanking adds a song reference parser which can be used to retrieve a song by likeability:
-
&N
: References a random song which the user has assigned the likeabilityN
to (-2, -1, 1 or 2). Keep in mind that since "neutral" opinions are not kept in the index,&0
will not work.
Use the !song rank
command to see your current likeability value assigned to a song.
This command will also display the song's overall rank calculated from the opinions of all users who have assigned a likeability.
If the parameter scaleExtremists
is set, then in the event that a user has more -2 and 2 likeabilities than -1 and 1, the weight of each of their -2 and 2 likeabilities on song ranks is scaled down using this formula:
abs_likeability = (abs_likeability - 1) * amount_1_votes / amount_2_votes * scaleExtremists + 1
For example, if scaleExtremists is 1.0 (the default) and Bob has the following opinions in the index:
-2, -2, -1, 1, 1, 2
Since there are more -2 than -1 votes, -2 votes will be scaled down:
abs_likeability = (2 - 1) * 1 / 2 + 1 = 1.5
Bob's -2
votes actually weigh -1.5
. This balances the system out for people who make use of the full spectrum of opinions.