ubclaunchpad / rocket

:rocket: Slack bot, team management, and onboarding system for UBC Launch Pad - superseded by Rocket2: https://github.com/ubclaunchpad/rocket2
2 stars 0 forks source link

Team platforms #55

Closed bfbachmann closed 6 years ago

bfbachmann commented 6 years ago
@rocket set name={Bruno}

There is no longer any notion of an "argument" for a command. Everything is an option. I did this because it's much easier to just treat all "arguments" as key-value pairs. It also allows us to work around the issue of only being able to support at most one multi-word argument in a command. Because all values for options are enclosed in {} you can put whitespace in your value without the framework interpreting it as multiple arguments. Required options will be enforced by the framework, so they are essentially arguments. I switched from using backticks to enclose the value assigned to some option to using {} because Slack won't do @mentions properly if you enclose them in backticks.