generated from Nemesis/Exemple
bot.client vers bot.client.api
This commit is contained in:
parent
33caf33136
commit
a5dc420dd0
1 changed files with 4 additions and 4 deletions
|
|
@ -710,7 +710,7 @@ async def getNick(room, message): # Obtenir le DisplayName à partir du mxid.
|
|||
#except:
|
||||
# nick = room.user_name(sender)
|
||||
try:
|
||||
members = await bot.client.get_room_members(room.room_id)
|
||||
members = await bot.client.api.get_room_members(room.room_id)
|
||||
for member in members:
|
||||
if member['state_key'] == sender:
|
||||
nick = member['content'].get('displayname')
|
||||
|
|
@ -931,7 +931,7 @@ async def verifPMRoom(room, message): # Pour obtenir ou créer un salon pour les
|
|||
room_id = prive.get(sender)
|
||||
members = []
|
||||
try:
|
||||
members = await bot.client.get_room_members(room_id)
|
||||
members = await bot.client.api.get_room_members(room_id)
|
||||
print("Les membres du salon prive :")
|
||||
print(members)
|
||||
except:
|
||||
|
|
@ -1256,7 +1256,7 @@ async def bienvenue(room,message): # Affichage d'un message d'accueil aux nouvea
|
|||
if (modules[room.room_id, 'welcome']):
|
||||
sender = getUser(message)
|
||||
nick = None
|
||||
members = await bot.client.get_room_members(room.room_id)
|
||||
members = await bot.client.api.get_room_members(room.room_id)
|
||||
for member in members:
|
||||
if member['state_key'] == message.state_key:
|
||||
nick = member['content'].get('displayname')
|
||||
|
|
@ -1344,7 +1344,7 @@ async def addquote(room,message): # enregistrer les citations mode reponses matr
|
|||
auteur = match.group(1)
|
||||
#nick = room.user_name(auteur)
|
||||
try:
|
||||
members = await bot.client.get_room_members(room.room_id)
|
||||
members = await bot.client.api.get_room_members(room.room_id)
|
||||
for member in members:
|
||||
if member['state_key'] == auteur:
|
||||
nick = member['content'].get('displayname')
|
||||
|
|
|
|||
Loading…
Reference in a new issue