Browse Source

v0.19.1 restrict .quiet to admins

master
Zac Herd 7 years ago
parent
commit
084f6f1cf4
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      bot.py

+ 6
- 3
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:


Loading…
Cancel
Save