diff --git a/asmodee.py b/asmodee.py index 2ec711e..56ad341 100644 --- a/asmodee.py +++ b/asmodee.py @@ -930,7 +930,12 @@ async def verifPMRoom(room, message): # Pour obtenir ou créer un salon pour les bot_nick = getNick(room, message) salon = None room_id = prive.get(sender) - if (room_id): + members = [] + try: + members = await bot.client.get_room_members(room_id) + except: + print("Pas d'accès au salon, on le refait") + if (room_id and members is not None and len(members) > 0): await bot.async_client.room_invite(room_id=room_id, user_id=sender) new_salon = nio.rooms.MatrixRoom(room_id, client_id) new_salon.name=bot_nick