Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respond to "unclassified" messages #13

Open
lpatmo opened this issue Feb 20, 2018 · 1 comment
Open

Respond to "unclassified" messages #13

lpatmo opened this issue Feb 20, 2018 · 1 comment
Labels
Backlog Issues considered non-priority or ice box features Discussion Needed enhancement

Comments

@lpatmo
Copy link
Member

lpatmo commented Feb 20, 2018

If users type a message back to greetbot, we should respond and inform them that they're typing to a bot.

@BethanyG
Copy link
Member

Will need to do a bit more research here, but generally, I think we'll need to do the following:

  1. Subscribe the bot_user to app_mention in the Slack /events API (See: https://api.slack.com/bot-users)
  2. Add the incoming message for the bot to the generic method that parses /events in the CodeBuddies app
  3. Add a method to respond to the message, based on it's flag or content or other criteria. In this case, it would be an "unclassified" message - so maybe this can be set up as a default case in a switch statement that handles any messages addressed directly to the bot.
  4. A basic bot reply will be required to open a websocket with the RTM API by sending an authenticated call to the rtm.connect API method (See: https://api.slack.com/rtm). chat.postEphemeral might also be useful in this context (https://api.slack.com/methods/chat.postEphemeral). If it's decided that a more complicated (or emoji-tastic ) response is needed, then the bot will need to use the Web API method chat.postMessage (https://api.slack.com/methods/chat.postMessage).

As for messages. Something along the lines of:

Thanks for your reply, but I'm only a humble bot. Please post in #codebuddies-meta or #general to interact with human community members. ❤️

@angelocordon angelocordon added Backlog Issues considered non-priority or ice box features and removed help wanted Extra attention is needed labels Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Issues considered non-priority or ice box features Discussion Needed enhancement
Projects
None yet
Development

No branches or pull requests

3 participants