1
0
mirror of https://github.com/MrDetonia/Maki.git synced 2024-11-22 11:54:16 -05:00

v0.19.1 restrict .quiet to admins

This commit is contained in:
Zac Herd 2016-12-03 01:00:05 +00:00
parent c59eaf0a01
commit 084f6f1cf4

9
bot.py
View File

@ -31,7 +31,7 @@ from secret import token, lfmkey
# CONFIGURATION # CONFIGURATION
# bot version # bot version
version = "v0.19.0" version = "v0.19.1"
# text shown by .help command # text shown by .help command
helptext = """I am a Discord bot written in Python helptext = """I am a Discord bot written in Python
@ -341,10 +341,13 @@ def on_message(message):
response = out.decode('utf-8').strip() response = out.decode('utf-8').strip()
elif message.content.startswith('.quiet'): 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'): 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) quiet.pop(message.server.id, None)
# Stuff that happens when message is not a bot command: # Stuff that happens when message is not a bot command: