1
0
mirror of https://github.com/MrDetonia/Maki.git synced 2024-11-25 12:40:46 -05:00

v0.20.1, better case ignoring

This commit is contained in:
Zac Herd 2017-04-22 14:37:51 +00:00
parent 1873240df4
commit e7a115f412

8
bot.py
View File

@ -31,7 +31,7 @@ from secret import token, lfmkey, steamkey
# CONFIGURATION # CONFIGURATION
# bot version # bot version
version = "v0.20.0" version = "v0.20.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
@ -423,15 +423,15 @@ def on_message(message):
pass pass
# someone noticed me! <3 # someone noticed me! <3
if bool(re.search(r'\b[Mm][Aa][Kk][Ii]\b', message.content)): if bool(re.search(r'\bmaki\b', message.content, re.IGNORECASE)):
yield from client.add_reaction(message, '\N{BLACK HEART SUIT}') yield from client.add_reaction(message, '\N{BLACK HEART SUIT}')
# butter # butter
if bool(re.search(r'\b[Bb][Uu][Tt][Tt][Ee][Rr]\b', message.content)): if bool(re.search(r'\bbutter\b', message.content, re.IGNORECASE)):
yield from client.add_reaction(message, '\N{PERSON WITH FOLDED HANDS}') yield from client.add_reaction(message, '\N{PERSON WITH FOLDED HANDS}')
# egg # egg
if bool(re.search(r'\b[Ee][Gg][Gg]\b', message.content)): if bool(re.search(r'\begg\b', message.content, re.IGNORECASE)):
yield from client.add_reaction(message, '\N{AUBERGINE}') yield from client.add_reaction(message, '\N{AUBERGINE}')
# send response to channel if needed: # send response to channel if needed: