1
0
mirror of https://github.com/MrDetonia/Maki.git synced 2024-11-22 11:54:16 -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" name = "Maki"
# bot version # bot version
version = "v0.10.2" version = "v0.10.3"
# text shown by .help command # text shown by .help command
helptext = """I am a bot written in Python by MrDetonia helptext = """I am a bot written in Python by MrDetonia
@ -283,8 +283,9 @@ def on_message(message):
json.dump(history, fp) json.dump(history, fp)
# log user messages for markov chains # log user messages for markov chains
with open('./markovs/' + message.author.id, 'a') as fp: if '```' not in message.content:
fp.write('\n' + message.content) with open('./markovs/' + message.author.id, 'a') as fp:
fp.write('\n' + message.content)
# Ben meme trackers # Ben meme trackers
if '/ck/' in message.content and message.author.name == "Ben.H": if '/ck/' in message.content and message.author.name == "Ben.H":