generated from Nemesis/Exemple
modo sur invitation
This commit is contained in:
parent
88561c73f6
commit
b7c233fcbb
1 changed files with 7 additions and 9 deletions
16
asmodee.py
16
asmodee.py
|
@ -1495,20 +1495,18 @@ def invitations(room_id, state): # Reponse aux invitations
|
||||||
try:
|
try:
|
||||||
global bot
|
global bot
|
||||||
bot.client.join_room(room_id)
|
bot.client.join_room(room_id)
|
||||||
room = bot.client.rooms[room_id]
|
|
||||||
|
|
||||||
if ('welcome' in liste_mod):
|
if ('welcome' in liste_mod):
|
||||||
modules[room.room_id, 'welcome'] = True
|
modules[room_id, 'welcome'] = True
|
||||||
if ('roll' in liste_mod):
|
if ('roll' in liste_mod):
|
||||||
modules[room.room_id, 'roll'] = True
|
modules[room_id, 'roll'] = True
|
||||||
if ('quote' in liste_mod):
|
if ('quote' in liste_mod):
|
||||||
modules[room.room_id, 'quote'] = True
|
modules[room_id, 'quote'] = True
|
||||||
if ('liste' in liste_mod):
|
if ('liste' in liste_mod):
|
||||||
modules[room.room_id, 'liste'] = True
|
modules[room_id, 'liste'] = True
|
||||||
global modos
|
global modos
|
||||||
if (modos.get(room.room_id,True) or len(modos[room.room_id]) == 0):
|
if (modos.get(room_id,True) or len(modos[room_id]) == 0):
|
||||||
#modos[room.room_id] =
|
modos[room_id] = [state['event']['sender']]
|
||||||
print(state)
|
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
del bot
|
del bot
|
||||||
save()
|
save()
|
||||||
|
|
Loading…
Reference in a new issue