mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Sort people in the mmevent start message
This commit is contained in:
parent
887411df6d
commit
e6e6809419
1 changed files with 2 additions and 3 deletions
|
@ -150,10 +150,9 @@ class MatchmakingCommand(Command):
|
||||||
|
|
||||||
return callback
|
return callback
|
||||||
|
|
||||||
@staticmethod
|
def _gen_event_start_message(self, mmevent: MMEvent):
|
||||||
def _gen_event_start_message(mmevent: MMEvent):
|
|
||||||
text = f"🚩 L'evento [b]{mmevent.title}[/b] è iniziato!\n\n"
|
text = f"🚩 L'evento [b]{mmevent.title}[/b] è iniziato!\n\n"
|
||||||
for response in mmevent.responses:
|
for response in sorted(mmevent.responses, key=lambda r: -self._mmchoice_values[r.choice]):
|
||||||
response: MMResponse
|
response: MMResponse
|
||||||
text += f"{response.choice.value} {response.user}\n"
|
text += f"{response.choice.value} {response.user}\n"
|
||||||
return text
|
return text
|
||||||
|
|
Loading…
Reference in a new issue