We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cadd0d8 + 5c12f22 commit e4a3260Copy full SHA for e4a3260
content/posts/160604-build-first-slack-bot-python.markdown
@@ -128,7 +128,7 @@ variable values and then instantiate the Slack client.
128
# constants
129
RTM_READ_DELAY = 1 # 1 second delay between reading from RTM
130
EXAMPLE_COMMAND = "do"
131
- MENTION_REGEX = "^<@(|[WU].+)>(.*)"
+ MENTION_REGEX = "^<@(|[WU].+?)>(.*)"
132
133
134
The code instantiates the `SlackClient` client with our `SLACK_BOT_TOKEN`
@@ -263,7 +263,7 @@ starterbot_id = None
263
264
265
266
-MENTION_REGEX = "^<@(|[WU].+)>(.*)"
+MENTION_REGEX = "^<@(|[WU].+?)>(.*)"
267
268
def parse_bot_commands(slack_events):
269
"""
0 commit comments