debug
This commit is contained in:
parent
f96f7978be
commit
9b5571108a
1 changed files with 4 additions and 0 deletions
|
@ -1,8 +1,11 @@
|
|||
import logging
|
||||
import niobot
|
||||
from thefuzz import fuzz
|
||||
|
||||
|
||||
class InfoModule(niobot.Module):
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@niobot.command(name="room-info", aliases=["ri"])
|
||||
async def room_info(self, ctx: niobot.Context, room: str = None):
|
||||
"""
|
||||
|
@ -36,6 +39,7 @@ class InfoModule(niobot.Module):
|
|||
if ctx.event.sender not in room_obj.users:
|
||||
continue
|
||||
ratio = fuzz.ratio(room, room_obj.display_name)
|
||||
self.log.debug("%r: %r", room_obj.display_name, ratio)
|
||||
if ratio > 1:
|
||||
matches.append((room_obj, ratio))
|
||||
matches.sort(
|
||||
|
|
Loading…
Reference in a new issue