From 1eb276c8f4457bd9e4d53639be2e6e664e01b575 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 8 Oct 2015 18:39:56 +0200 Subject: [PATCH] Nuovi /rage in shuffle! --- bot.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index d3fe18b6..00a5955f 100644 --- a/bot.py +++ b/bot.py @@ -1,6 +1,10 @@ # -*- coding: utf-8 -*- import telegram import steam +import random + +#Playlist di /rage, si riempie quando รจ vuota +rage = [] print("Bot avviato!") while(True): @@ -29,4 +33,9 @@ while(True): else: telegram.sendMessage(chr(9888) + " Non hai specificato un gioco! [Visualizza tutte le offerte](https://isthereanydeal.com/#/search:.;/scroll:%23gamelist).", sby) elif(cmd[0].startswith('/rage')): - telegram.sendDocument("BQADAgAD3wEAAh8GgAE6ZnLP5_gFMwI", sby) + if(len(rage) <= 0): + #Elenco degli audio disponibili + rage = ['BQADAgAD3wEAAh8GgAE6ZnLP5_gFMwI', 'BQADAgAD5AEAAh8GgAGu0FpK_X2DuQI', 'BQADAgAD5gEAAh8GgAGvUTJ9meZixwI', 'BQADAgAD5wEAAh8GgAHJSoUnCr9WxwI'] + random.shuffle(rage) + ragesend = rage.pop() + telegram.sendDocument(ragesend, sby) \ No newline at end of file