Fix newroom command
This commit is contained in:
parent
551fec9050
commit
ca947383f9
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ from nio.rooms import MatrixRoom
|
||||||
|
|
||||||
async def command_newroom(room: MatrixRoom, event: RoomMessageText, bot):
|
async def command_newroom(room: MatrixRoom, event: RoomMessageText, bot):
|
||||||
room_name = " ".join(event.body.split()[
|
room_name = " ".join(event.body.split()[
|
||||||
2:]) or context["default_room_name"]
|
2:]) or bot.default_room_name
|
||||||
|
|
||||||
bot.logger.log("Creating new room...")
|
bot.logger.log("Creating new room...")
|
||||||
new_room = await bot.matrix_client.room_create(name=room_name)
|
new_room = await bot.matrix_client.room_create(name=room_name)
|
||||||
|
|
Loading…
Reference in a new issue