generated from Nemesis/Exemple
room_id
This commit is contained in:
parent
cabe70468c
commit
33caf33136
1 changed files with 3 additions and 4 deletions
|
|
@ -710,13 +710,12 @@ async def getNick(room, message): # Obtenir le DisplayName à partir du mxid.
|
||||||
#except:
|
#except:
|
||||||
# nick = room.user_name(sender)
|
# nick = room.user_name(sender)
|
||||||
try:
|
try:
|
||||||
members = await bot.client.get_room_members(room_id)
|
members = await bot.client.get_room_members(room.room_id)
|
||||||
for member in members:
|
for member in members:
|
||||||
if member['state_key'] == sender:
|
if member['state_key'] == sender:
|
||||||
nick = member['content'].get('displayname')
|
nick = member['content'].get('displayname')
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
print(members)
|
|
||||||
nick = sender
|
nick = sender
|
||||||
return(nick)
|
return(nick)
|
||||||
|
|
||||||
|
|
@ -1257,7 +1256,7 @@ async def bienvenue(room,message): # Affichage d'un message d'accueil aux nouvea
|
||||||
if (modules[room.room_id, 'welcome']):
|
if (modules[room.room_id, 'welcome']):
|
||||||
sender = getUser(message)
|
sender = getUser(message)
|
||||||
nick = None
|
nick = None
|
||||||
members = await bot.client.get_room_members(room_id)
|
members = await bot.client.get_room_members(room.room_id)
|
||||||
for member in members:
|
for member in members:
|
||||||
if member['state_key'] == message.state_key:
|
if member['state_key'] == message.state_key:
|
||||||
nick = member['content'].get('displayname')
|
nick = member['content'].get('displayname')
|
||||||
|
|
@ -1345,7 +1344,7 @@ async def addquote(room,message): # enregistrer les citations mode reponses matr
|
||||||
auteur = match.group(1)
|
auteur = match.group(1)
|
||||||
#nick = room.user_name(auteur)
|
#nick = room.user_name(auteur)
|
||||||
try:
|
try:
|
||||||
members = await bot.client.get_room_members(room_id)
|
members = await bot.client.get_room_members(room.room_id)
|
||||||
for member in members:
|
for member in members:
|
||||||
if member['state_key'] == auteur:
|
if member['state_key'] == auteur:
|
||||||
nick = member['content'].get('displayname')
|
nick = member['content'].get('displayname')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue