LakeYS / Discord-Trivia-Bot

TriviaBot: Play trivia in Discord! Powered by discord.js and OpenTDB, with 24 categories and three modes of play.
Apache License 2.0
84 stars 39 forks source link

Answers containing diacritics are not sorted consistently #214

Closed Peterr-K closed 3 years ago

Peterr-K commented 3 years ago

Hi

I just found out, when question is showed it has the same ABCD answers everytime, can they be randomized?

Sometimes the correct answer is the same letter for like 10 questions in a row, can this be a bug?

In both cases local question database is used.

thx

LakeYS commented 3 years ago

Answers are currently sorted in reverse alphabetical order as seen here--this is intentional. In the instance of having the same letter, can you verify if the answers are sorting? It may be related to how they are formatted in some form as well.

Peterr-K commented 3 years ago

When answers start with a same letter it's ok, they are sorted by next letters. Not sure if that is important actually, or why they need to be sorted alphabetically, but sorting script doesn't recognize correctly letters with diacritics, so: correct way: a á b c č d ď e é trivia bot is sorting like: a b c d e .. x y z á č ď é...

LakeYS commented 3 years ago

I see! Will take a look at this