1
0
mirror of https://github.com/MrDetonia/Maki.git synced 2024-11-13 00:26:53 -05:00

Filter out messages with code blocks from being logged, v0.10.3

This commit is contained in:
Zac Herd 2016-04-03 17:30:40 +01:00
parent 63dc799fef
commit 05fd866342

7
bot.py
View File

@ -24,7 +24,7 @@ from secret import email,pwd
name = "Maki"
# bot version
version = "v0.10.2"
version = "v0.10.3"
# text shown by .help command
helptext = """I am a bot written in Python by MrDetonia
@ -283,8 +283,9 @@ def on_message(message):
json.dump(history, fp)
# log user messages for markov chains
with open('./markovs/' + message.author.id, 'a') as fp:
fp.write('\n' + message.content)
if '```' not in message.content:
with open('./markovs/' + message.author.id, 'a') as fp:
fp.write('\n' + message.content)
# Ben meme trackers
if '/ck/' in message.content and message.author.name == "Ben.H":