Only add matches
This commit is contained in:
parent
d57a98e012
commit
f96f7978be
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue