{"action":"created","issue":{"url":"https://api.github.com/repos/localytics/lambda-slack-router/issues/16","repository_url":"https://api.github.com/repos/localytics/lambda-slack-router","labels_url":"https://api.github.com/repos/localytics/lambda-slack-router/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/localytics/lambda-slack-router/issues/16/comments","events_url":"https://api.github.com/repos/localytics/lambda-slack-router/issues/16/events","html_url":"https://github.com/localytics/lambda-slack-router/pull/16","id":141595663,"number":16,"title":"Allow optional arguments","user":{"login":"kddeisz","id":5093358,"avatar_url":"https://avatars.githubusercontent.com/u/5093358?v=3","gravatar_id":"","url":"https://api.github.com/users/kddeisz","html_url":"https://github.com/kddeisz","followers_url":"https://api.github.com/users/kddeisz/followers","following_url":"https://api.github.com/users/kddeisz/following{/other_user}","gists_url":"https://api.github.com/users/kddeisz/gists{/gist_id}","starred_url":"https://api.github.com/users/kddeisz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kddeisz/subscriptions","organizations_url":"https://api.github.com/users/kddeisz/orgs","repos_url":"https://api.github.com/users/kddeisz/repos","events_url":"https://api.github.com/users/kddeisz/events{/privacy}","received_events_url":"https://api.github.com/users/kddeisz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-17T14:16:16Z","updated_at":"2016-03-17T19:30:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/localytics/lambda-slack-router/pulls/16","html_url":"https://github.com/localytics/lambda-slack-router/pull/16","diff_url":"https://github.com/localytics/lambda-slack-router/pull/16.diff","patch_url":"https://github.com/localytics/lambda-slack-router/pull/16.patch"},"body":"This is a breaking change that will allow optional arguments to be specified\r\nfor commands. As such, the manner in which you specify arguments needed to change\r\nas well. Before you would specify them as part of the command name string:\r\n\r\n    slackbot.addCommand('testing one two three', 'The test command', function() {});\r\n\r\nnow you specify them as an array:\r\n\r\n    slackbot.addCommand(['testing', 'one', 'two', 'three'], 'The test command', function() {});\r\n\r\nThis paves the way for having commands that match multiple words instead of one.\r\nIt also allows us to specify optional arguments as:\r\n\r\n    slackbot.addCommand(['testing', 'one', { two: 2 }], 'The test command', function() {});"},"comment":{"url":"https://api.github.com/repos/localytics/lambda-slack-router/issues/comments/198047213","html_url":"https://github.com/localytics/lambda-slack-router/pull/16#issuecomment-198047213","issue_url":"https://api.github.com/repos/localytics/lambda-slack-router/issues/16","id":198047213,"user":{"login":"kddeisz","id":5093358,"avatar_url":"https://avatars.githubusercontent.com/u/5093358?v=3","gravatar_id":"","url":"https://api.github.com/users/kddeisz","html_url":"https://github.com/kddeisz","followers_url":"https://api.github.com/users/kddeisz/followers","following_url":"https://api.github.com/users/kddeisz/following{/other_user}","gists_url":"https://api.github.com/users/kddeisz/gists{/gist_id}","starred_url":"https://api.github.com/users/kddeisz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kddeisz/subscriptions","organizations_url":"https://api.github.com/users/kddeisz/orgs","repos_url":"https://api.github.com/users/kddeisz/repos","events_url":"https://api.github.com/users/kddeisz/events{/privacy}","received_events_url":"https://api.github.com/users/kddeisz/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T19:30:39Z","updated_at":"2016-03-17T19:30:39Z","body":"Yeah, actually that was originally how I had it but it seems like it might be too weird to have four arguments. Plus then you have to put in an empty array every time for commands that take no arguments (which is a pretty common case). "}}