This commit is contained in:
nemesis 2025-11-10 11:39:47 +01:00
parent f4e4e50250
commit 15a4fd50f1

View file

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