I have following output, with each number being on their own line.
reaction 2
reaction 1
reaction 1
reaction 2
reaction 3
How can I sort the numbers in this output to descend from the biggest to the smallest value
reaction 3
reaction 2
reaction 2
reaction 1
reaction 1
I got this output with this code. Its a script for a discord bot, that get all messages that have a reaction, checks if its the reaction you were looking for (msgSplit[1]) and checks if its has the amount of reactions you were looking for with if num >= int(msgSplit[2]):
async for historical_message in message.channel.history(limit=historyLimit):
for reaction in historical_message.reactions:
if reaction.emoji == msgSplit[1]:
num = reaction.count
if num >= int(msgSplit[2]):
print(reaction, num)