generated from Nemesis/Exemple
lmod get
This commit is contained in:
parent
4c66040b09
commit
55d848e154
1 changed files with 5 additions and 5 deletions
10
asmodee.py
10
asmodee.py
|
@ -669,7 +669,7 @@ async def modo(room,message): # Definition d'un moderateur
|
|||
print("texte : " + texte + " sender : " + sender)
|
||||
lmod = []
|
||||
try:
|
||||
lmod = modos[room.room_id]
|
||||
lmod = modos.get(room.room_id)
|
||||
except:
|
||||
lmod = []
|
||||
if (sender in admins or sender in lmod or sender == bot.client.user_id):
|
||||
|
@ -704,7 +704,7 @@ async def module(room,message): # Definition des modules d'un salon
|
|||
sender = getUser(message)
|
||||
texte = getMessage(message)
|
||||
try:
|
||||
lmod = modos[room.room_id]
|
||||
lmod = modos.get(room.room_id)
|
||||
except:
|
||||
lmod = []
|
||||
if (sender in admins or sender in lmod or sender == bot.client.user_id):
|
||||
|
@ -970,7 +970,7 @@ async def biere(room,message): # Gestion des boissons
|
|||
await msg(salon,reponse,sender)
|
||||
elif (len(args) > 1 and args[0] == "del"):
|
||||
salon = await verifPMRoom(room,message)
|
||||
lmod = modos[room.room_id]
|
||||
lmod = modos.get(room.room_id)
|
||||
if (sender in admins):
|
||||
id = args[1]
|
||||
reponse = "Voici le breuvage supprimé : \n"
|
||||
|
@ -1090,7 +1090,7 @@ async def salon(room,message): # Gestion des listes de salons recommandes
|
|||
await msg(room,"Ajout du salon " + ref + " : " + desc,sender)
|
||||
elif (len(args) > 1 and args[0] == "del"):
|
||||
salon = await verifPMRoom(room,message)
|
||||
lmod = modos[room.room_id]
|
||||
lmod = modos.get(room.room_id)
|
||||
if (sender in admins):
|
||||
id = args[1]
|
||||
reponse = "Voici le salon supprimé : \n"
|
||||
|
@ -1150,7 +1150,7 @@ async def accueil(room,message): # Mettre un message d'accueil
|
|||
if (modules[room.room_id, 'welcome']):
|
||||
sender = getUser(message)
|
||||
mess = getMessage(message)
|
||||
lmod = modos[room.room_id]
|
||||
lmod = modos.get(room.room_id)
|
||||
if (sender in admins or sender in lmod):
|
||||
global welcome
|
||||
args = mess.split()
|
||||
|
|
Loading…
Reference in a new issue