From 084f6f1cf4ea4db831d359247892a8f7f8ab3027 Mon Sep 17 00:00:00 2001 From: Zac Herd Date: Sat, 3 Dec 2016 01:00:05 +0000 Subject: [PATCH] v0.19.1 restrict .quiet to admins --- bot.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 19b7414..28bf226 100644 --- a/bot.py +++ b/bot.py @@ -31,7 +31,7 @@ from secret import token, lfmkey # CONFIGURATION # bot version -version = "v0.19.0" +version = "v0.19.1" # text shown by .help command helptext = """I am a Discord bot written in Python @@ -341,10 +341,13 @@ def on_message(message): response = out.decode('utf-8').strip() elif message.content.startswith('.quiet'): - quiet[message.server.id] = 1 + if message.author.id in admins: + quiet[message.server.id] = 1 + else + response = "No, *you* be quiet!" elif message.content.startswith('.loud'): - if message.server.id in quiet: + if message.server.id in quiet and message.author.id in admins: quiet.pop(message.server.id, None) # Stuff that happens when message is not a bot command: