diff options
author | AnInternetTroll <lucafulger@gmail.com> | 2020-05-10 20:48:08 +0000 |
---|---|---|
committer | AnInternetTroll <lucafulger@gmail.com> | 2020-05-10 20:48:08 +0000 |
commit | efa99965c4390bca433999c6ff5c188a84b2dbe5 (patch) | |
tree | 8dfe219692ab161ba7bde9770e6932cd466cc9c0 /bot.py | |
parent | e56aee64210ebcb2603d1497bdc577670b7e0ed7 (diff) | |
download | steve-bot-efa99965c4390bca433999c6ff5c188a84b2dbe5.tar steve-bot-efa99965c4390bca433999c6ff5c188a84b2dbe5.tar.gz steve-bot-efa99965c4390bca433999c6ff5c188a84b2dbe5.tar.bz2 steve-bot-efa99965c4390bca433999c6ff5c188a84b2dbe5.tar.lz steve-bot-efa99965c4390bca433999c6ff5c188a84b2dbe5.tar.xz steve-bot-efa99965c4390bca433999c6ff5c188a84b2dbe5.tar.zst steve-bot-efa99965c4390bca433999c6ff5c188a84b2dbe5.zip |
Added findseed command and the ! prefix
Diffstat (limited to 'bot.py')
-rwxr-xr-x | bot.py | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -14,7 +14,7 @@ extensions = [ class BedrockBot(commands.Bot): def __init__(self): - super().__init__(command_prefix='/') + super().__init__(command_prefix=('/', '!')) self.logger = logging.getLogger('discord') with open('custom_commands.json', 'r') as f: @@ -38,22 +38,25 @@ class BedrockBot(commands.Bot): if message.author.bot: return + badWords = ["fair", "f a i r", "ⓕⓐⓘⓡ", "ⓕ ⓐ ⓘ ⓡ"] + try: + if message.channel.id == 589110766578434078: + count = 0 + for word in badWords: + if word in message.content.lower(): + count += 1; + fair = 'Fair '*count + await message.channel.send(fair) + + await self.process_commands(message) + except: + print("shrug") + command = message.content.split()[0] if command in self.custom_commands: await message.channel.send(self.custom_commands[command]) return - badWords = ["fair", "f a i r", "ⓕⓐⓘⓡ", "ⓕ ⓐ ⓘ ⓡ"] - if message.channel.id == 589110766578434078: - count = 0 - for word in badWords: - if word in message.content.lower(): - count += 1; - fair = 'Fair '*count - await message.channel.send(fair) - - await self.process_commands(message) - def run(self): super().run(config.token, reconnect=True) |