1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00
This commit is contained in:
Steffo 2016-10-02 20:29:10 +02:00
parent 8efa7d0168
commit e378864f77

22
bot.py
View file

@ -522,15 +522,19 @@ def match():
del cmd[0] del cmd[0]
for name in cmd: for name in cmd:
if username in royalgames: if username in royalgames:
if "steam" in royalgames[name]: if "steam" in royalgames[name.lower()]:
tobematched.append(royalgames[name]["steam"]) tobematched.append(royalgames[name.lower()]["steam"])
m = list(steammatch.compare(tobematched)) if tobematched > 2:
# Prepara il messaggio m = list(steammatch.compare(tobematched))
tosend = str() # Prepara il messaggio
for game in m: tosend = str()
tosend += "- {game}\n".format(game=game) for game in m:
# Manda il messaggio tosend += "- {game}\n".format(game=game)
telegram.sendmessage(tosend, sentin, source) # Manda il messaggio
telegram.sendmessage(tosend, sentin, source)
else:
telegram.sendmessage(chr(9888) + "Non sono stati specificati abbastanza utenti per eseguire l'intersezione.",
sentin, source)
# Ciclo principale del bot # Ciclo principale del bot