Default to current room
This commit is contained in:
parent
5ab51824ec
commit
ff2820e440
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ class InfoModule(niobot.Module):
|
|||
|
||||
<room> can be a room ID or alias.
|
||||
"""
|
||||
room = room or ctx.room.room_id
|
||||
if room.startswith("#"):
|
||||
x = await ctx.respond("Resolving room...")
|
||||
resolved = await ctx.bot.room_resolve_alias(room)
|
||||
|
@ -52,7 +53,7 @@ class InfoModule(niobot.Module):
|
|||
"Unknown room %r." % room
|
||||
)
|
||||
|
||||
room_obj: niobot.MatrixRoom = ctx.bot.rooms[room_obj]
|
||||
room_obj: niobot.MatrixRoom = ctx.bot.rooms[room]
|
||||
lines = [
|
||||
"Name: {obj.display_name!r} (is explicitly named: {obj.is_named!s})",
|
||||
"ID: `{obj.room_id}`",
|
||||
|
|
Loading…
Reference in a new issue