Fix newroom command

This commit is contained in:
Kumi 2023-05-01 19:27:45 +00:00
parent 551fec9050
commit ca947383f9
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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)