{"action":"created","issue":{"url":"https://api.github.com/repos/hubot-scripts/hubot-help/issues/1","labels_url":"https://api.github.com/repos/hubot-scripts/hubot-help/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/hubot-scripts/hubot-help/issues/1/comments","events_url":"https://api.github.com/repos/hubot-scripts/hubot-help/issues/1/events","html_url":"https://github.com/hubot-scripts/hubot-help/issues/1","id":60766118,"number":1,"title":"[Feature] Long help messages must be delivered over DM","user":{"login":"stephenyeargin","id":80459,"avatar_url":"https://avatars.githubusercontent.com/u/80459?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenyeargin","html_url":"https://github.com/stephenyeargin","followers_url":"https://api.github.com/users/stephenyeargin/followers","following_url":"https://api.github.com/users/stephenyeargin/following{/other_user}","gists_url":"https://api.github.com/users/stephenyeargin/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenyeargin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenyeargin/subscriptions","organizations_url":"https://api.github.com/users/stephenyeargin/orgs","repos_url":"https://api.github.com/users/stephenyeargin/repos","events_url":"https://api.github.com/users/stephenyeargin/events{/privacy}","received_events_url":"https://api.github.com/users/stephenyeargin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-12T03:34:33Z","updated_at":"2015-03-13T16:41:03Z","closed_at":null,"body":"Problem: Your Hubot has many packages. When a user types `hubot help`, a flood wall of text fills up the channel, raising the ire of his/her coworkers.\r\n\r\nMy simplest idea is that if the help text is more than a reasonable number (say, 20 lines), Hubot responds with \"Sorry, I can't display that here. Try sending me a direct message of `help` and I'll get that for you.\"\r\n\r\nFor cases where the bot is already exposed on a port (if using this script, it comes standard), the bot could alternatively respond with \"See our help docs at http://some-hubot.herokuapp.com/hubot/help\". This is less ideal, if only because not every set up has this working properly.\r\n\r\nThe better option would be to send the user a DM immediately upon asking for help (with a \"No problem! Check your direct messages.\" message in the room). The trouble there would be working with how each adapter implemented sending private messages -- I don't think they all support `robot.send { user: some_user_object }, \"MY MESSAGE\"`. My initial thoughts went something like this, but I realized halfway through writing it that it is likely impractical to make this script aware of each adapter's DM methodology.\r\n\r\n```coffee\r\n      switch robot.adapterName\r\n        when 'slack'\r\n          if robot.messageRoom\r\n            robot.messageRoom msg.envelope.user.id, emit\r\n        when 'irc'\r\n          if msg.sendPrivate\r\n            msg.sendPrivate emit\r\n        when 'hipchat'\r\n          robot.send msg.user, emit\r\n```\r\n\r\nI'm not certain how much of this should be configurable (Default to always sending a private message, or only if the help text is greater than `x` lines.)"},"comment":{"url":"https://api.github.com/repos/hubot-scripts/hubot-help/issues/comments/79115262","html_url":"https://github.com/hubot-scripts/hubot-help/issues/1#issuecomment-79115262","issue_url":"https://api.github.com/repos/hubot-scripts/hubot-help/issues/1","id":79115262,"user":{"login":"therealklanni","id":626347,"avatar_url":"https://avatars.githubusercontent.com/u/626347?v=3","gravatar_id":"","url":"https://api.github.com/users/therealklanni","html_url":"https://github.com/therealklanni","followers_url":"https://api.github.com/users/therealklanni/followers","following_url":"https://api.github.com/users/therealklanni/following{/other_user}","gists_url":"https://api.github.com/users/therealklanni/gists{/gist_id}","starred_url":"https://api.github.com/users/therealklanni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/therealklanni/subscriptions","organizations_url":"https://api.github.com/users/therealklanni/orgs","repos_url":"https://api.github.com/users/therealklanni/repos","events_url":"https://api.github.com/users/therealklanni/events{/privacy}","received_events_url":"https://api.github.com/users/therealklanni/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T16:41:03Z","updated_at":"2015-03-13T16:41:03Z","body":"I actually have a private version that does exactly this that I have been using with my personal Hubots. I will update the code a little bit to make this configurable and submit a PR when I get a chance."}}