{"action":"created","issue":{"url":"https://api.github.com/repos/go-chat-bot/bot/issues/69","repository_url":"https://api.github.com/repos/go-chat-bot/bot","labels_url":"https://api.github.com/repos/go-chat-bot/bot/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/go-chat-bot/bot/issues/69/comments","events_url":"https://api.github.com/repos/go-chat-bot/bot/issues/69/events","html_url":"https://github.com/go-chat-bot/bot/issues/69","id":301859098,"number":69,"title":"Getting two responses for single slack command","user":{"login":"dwdraju","id":4961484,"avatar_url":"https://avatars1.githubusercontent.com/u/4961484?v=4","gravatar_id":"","url":"https://api.github.com/users/dwdraju","html_url":"https://github.com/dwdraju","followers_url":"https://api.github.com/users/dwdraju/followers","following_url":"https://api.github.com/users/dwdraju/following{/other_user}","gists_url":"https://api.github.com/users/dwdraju/gists{/gist_id}","starred_url":"https://api.github.com/users/dwdraju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwdraju/subscriptions","organizations_url":"https://api.github.com/users/dwdraju/orgs","repos_url":"https://api.github.com/users/dwdraju/repos","events_url":"https://api.github.com/users/dwdraju/events{/privacy}","received_events_url":"https://api.github.com/users/dwdraju/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-02T18:21:50Z","updated_at":"2018-03-02T23:34:19Z","closed_at":null,"author_association":"NONE","body":"I am building slack bot which basically takes kubectl command like `kubectl get pods`. Now, I want to send some message like `Your request has been acknowledged` immediately after any command is sent from slack and then the result of command. Currently, I have implemented the command result sending process but couldn't figure out how to send the \"pre result message\". Any idea? I tried implementing this way:\r\n```\r\nfunc response(command *bot.PassiveCmd) (string, error) {\r\n   return fmt.Sprintf(\"Your request has been added to queue\"), nil\r\n}\r\nfunc init() {\r\n\tbot.RegisterPassiveCommand(\r\n\t\t\t\t\t\"\",\r\n\t\t\t\t\tresponse)\r\n}\r\nfunc init() {\r\n\tbot.RegisterCommand(\r\n \t\t\"deployer\",\r\n \t\t\"Kubectl Slack integration\",\r\n \t\t\"\",\r\n\tkubectl)\r\n \r\n}\r\n```\r\n\r\nBut the problem is when I enter slack message with `@deployer get pods`, then it triggers `kubectl` and when I just hit `kubectl get pods`, it triggers `response`. But I need to combine both. PS: Here, my cmdprefix is `@`. Hope you get it. If I am not clear, please feel free to ask on comment. Thanks."},"comment":{"url":"https://api.github.com/repos/go-chat-bot/bot/issues/comments/370087878","html_url":"https://github.com/go-chat-bot/bot/issues/69#issuecomment-370087878","issue_url":"https://api.github.com/repos/go-chat-bot/bot/issues/69","id":370087878,"user":{"login":"toolateforteddy","id":8571476,"avatar_url":"https://avatars2.githubusercontent.com/u/8571476?v=4","gravatar_id":"","url":"https://api.github.com/users/toolateforteddy","html_url":"https://github.com/toolateforteddy","followers_url":"https://api.github.com/users/toolateforteddy/followers","following_url":"https://api.github.com/users/toolateforteddy/following{/other_user}","gists_url":"https://api.github.com/users/toolateforteddy/gists{/gist_id}","starred_url":"https://api.github.com/users/toolateforteddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toolateforteddy/subscriptions","organizations_url":"https://api.github.com/users/toolateforteddy/orgs","repos_url":"https://api.github.com/users/toolateforteddy/repos","events_url":"https://api.github.com/users/toolateforteddy/events{/privacy}","received_events_url":"https://api.github.com/users/toolateforteddy/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T23:34:19Z","updated_at":"2018-03-02T23:34:19Z","author_association":"NONE","body":"If you are ok with using `@deployer get pods` then you can register it as a V3 command which allows you to send multiple messages over time by writing them to a channel.\r\n\r\nOtherwise, we can extend the passive command framework to offer a V3 equivalent. I can look into that this weekend."}}
{"actor":{"display_login":"toolateforteddy"}}