Update the matching algorythm to take into account role similarity

This commit is contained in:
Marc Di Luzio 2024-08-10 21:47:32 +01:00
parent d3eed67882
commit c87d7705cf
4 changed files with 128 additions and 72 deletions

View file

@ -91,7 +91,7 @@ async def match(interaction: discord.Interaction, group_min: int = None, matchee
# Create our groups!
matchees = list(
m for m in interaction.channel.members if matchee in m.roles)
groups = matching.members_to_groups(matchees, History, group_min)
groups = matching.members_to_groups(matchees, History, group_min, allow_fallback=True)
# Post about all the groups with a button to send to the channel
msg = '\n'.join(matching.group_to_message(g) for g in groups)