Only add matches
This commit is contained in:
parent
d57a98e012
commit
f96f7978be
1 changed files with 2 additions and 1 deletions
|
@ -36,6 +36,7 @@ class InfoModule(niobot.Module):
|
||||||
if ctx.event.sender not in room_obj.users:
|
if ctx.event.sender not in room_obj.users:
|
||||||
continue
|
continue
|
||||||
ratio = fuzz.ratio(room, room_obj.display_name)
|
ratio = fuzz.ratio(room, room_obj.display_name)
|
||||||
|
if ratio > 1:
|
||||||
matches.append((room_obj, ratio))
|
matches.append((room_obj, ratio))
|
||||||
matches.sort(
|
matches.sort(
|
||||||
key=lambda v: v[1],
|
key=lambda v: v[1],
|
||||||
|
|
Loading…
Reference in a new issue