From f96f7978be8e34c880bfc90531e2bbfd720b85a5 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Sat, 14 Sep 2024 23:22:23 +0100 Subject: [PATCH] Only add matches --- app/modules/info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/modules/info.py b/app/modules/info.py index df2f0c6..256e3d3 100644 --- a/app/modules/info.py +++ b/app/modules/info.py @@ -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