Only add matches

This commit is contained in:
Nexus 2024-09-14 23:22:23 +01:00
parent d57a98e012
commit f96f7978be

View file

@ -36,7 +36,8 @@ class InfoModule(niobot.Module):
if ctx.event.sender not in room_obj.users:
continue
ratio = fuzz.ratio(room, room_obj.display_name)
matches.append((room_obj, ratio))
if ratio > 1:
matches.append((room_obj, ratio))
matches.sort(
key=lambda v: v[1],
reverse=True