generated from Nemesis/Exemple
verifPM
This commit is contained in:
parent
f4e4e50250
commit
15a4fd50f1
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue