Skip to content

s-wigg/Rubber-Ducky-Chatbot

Repository files navigation

Build Status

What the Duck?! — Rubber Ducky Slack Chatbot

Who or What is Ducky?

Ducky is a domain specific Slack chatbot to help coders think through their coding challenges, but Ducky also seeks to address common ethical issues with bots such as discouraging abuse and responding appropriately to serious personal comments.

Say Hello to Ducky

Why do you need Ducky in your life?

It's 2am and you've hit a roadblock in your code. What the Duck are you supposed to do? Rubber Ducky Slackbot to the rescue! Ducky can serve as a rubber duck for the purposes of thinking through your coding blockers. Ducky can ask you questions and provide links to relevant Stack Overflow questions based on your input. Ducky will help speed you to the epiphany you're looking for to solve your coding troubles!

How to Use Ducky

Ducky Features

Screen shots and explanations of Ducky's features

Keywords

  • Using Ducky's name signifies you are asking them a question a personal question.
  • Adding "google", "help", "documentation", or "show me" to your input will cause Ducky to return a link to a Stack Overflow answer.
  • Writing "Ducky, markov chain me" or including the word "Shakespeare" in user input will cause Ducky to generate a 100 word poem in the style of a Shakespeare Sonnet generated using a Markov Chain.

FAQ

FAQ

Conversation Flow Diagram

Visualization of Ducky's Decision Making Process in Developing Responses to User Input

Installation

  1. Clone the repo
  2. Create a bot user if you don't have one yet, and copy the API Token
  3. Set your Slack API token via the command line: export SLACK_TOKEN="your-api-token"
  4. Download and start running ngrok. Helpful ngrok tips
  5. Once you're running ngrok in a terminal window, copy and paste the forwarding URL into the Slack Outgoing Webhooks page on the 'outgoing webhook integration' line.
  6. On the Slack Outgoing Webhooks page, scroll down to the Integration Settings section. Select “#general” (or whichever channel(s) you want to use Ducky in) as the channel to listen on. Copy your ngrok Forwarding URL plus “/slack” into the URL(s) text box. Copy the generated Token. Scroll down and press the “Save Settings” button. If deploying on AWS (for example Elastic Beanstalk) include that link (plus "/slack") instead or in addition.
  7. Set the Slack secret token via the command line: export SLACK_OUTGOING_WEBHOOK_SECRET='your-copied-token'
  8. Visit the [Google APIs Console](https://console.developers.google.com/apis to get an API key for your application. Set the Google API Key variable via the command line: export GOOGLE_API_KEY='your-copied-token'
  9. Obtain a Google Custom Search ID. When set, the custom search engine will be used instead of Google Web Search. Set the Google Custom Search ID via the command line: export CSE_ID='your-copied-token'
  10. pip install -r requirements.txt
  11. flask run
  12. Invite Ducky into the channel(s) you designated on the Slack Outgoing Webhooks page. Ducky will respond to any message in that channel, so it's recommended to create a separate channel for just you and Ducky to talk.

These instructions can be used to develop, run, and test Ducky locally. To deploy Ducky set the necessary environment variables via the established patterns of your system. For example, if deploying on AWS, environment variables can be set through the Elastic Beanstalk console instead.

Using a virtualenv is recommended with Python applications.

General Slack Documentation
Documentation for Dependencies of the Application

Acknowledgements

The following tutorials were particularly helpful in the development of this project:

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published