From 5272d530812918cc93860fe927309d6ea221f4c7 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 19 Jul 2017 21:25:20 +0200 Subject: [PATCH] Fatto! (closes #64) --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index c3b650d..a7b1ea3 100644 --- a/main.py +++ b/main.py @@ -53,6 +53,12 @@ class Player: """Uccidi il giocatore.""" self.role.ondeath() self.alive = False + # Silenzia il giocatore + if self is not self.game.admin: + try: + self.game.bot.restrictChatMember(self.game.groupid, self.tid, None, False, False, False, False) + except Unauthorized: + print("Bot is not administrator in group {}".format(self.groupid)) class Game: