mirror of
https://github.com/supleed2/gondilinabot-python.git
synced 2024-11-10 01:35:50 +00:00
Fix Regex term
Should now only match when at the start of message or word
This commit is contained in:
parent
f4a44f891b
commit
558eabccca
2
app.py
2
app.py
|
@ -28,7 +28,7 @@ async def on_message(message):
|
|||
else:
|
||||
global counter
|
||||
print("Message from " + message.author.name + ": " + message.content)
|
||||
reply = re.split("I'm |Im |i'm |im |I am |i am ", message.content, 1)
|
||||
reply = re.split("(^| )(I'm |Im |i'm |im |I am |i am )", message.content, 1)
|
||||
if len(reply) > 1:
|
||||
if counter > 0:
|
||||
counter -= 1
|
||||
|
|
Loading…
Reference in a new issue