llimllib / limbo

A simple, clean, easy to modify Slack chatbot
MIT License
403 stars 160 forks source link

multi-input #90

Closed bsmoo closed 7 years ago

bsmoo commented 7 years ago

Hey,

What's your preferred method of reading multiple inputs? such as the below:

!calendar 2016-05-25 busy
llimllib commented 7 years ago

There are two approaches I use:

  1. Break the message into multiple bits by regex, like re.findall(r'!calendar (\w*) (\w*)')
  2. Use argparse to parse the command. The banner plugin uses this approach, for example