Giter VIP home page Giter VIP logo

civictechto-chatbot's Introduction

Roobot: CivicTechTO Chatbot

๐Ÿ‘‹๐Ÿ–– A friendly chatbot that lives in Civic Tech Toronto's Slack team. ๐Ÿ’ฌ๐Ÿค–

Technologies Used

  • Coffeescript. A little language with syntactic sugar that compiles into JavaScript.
    • Hubot. A chatbot framework for running/creating shared tasks.
  • Heroku. A platform for easily deploying applications.
  • Slack. A user-friendly chat tool for large teams and communities.

Commands & Helper Scripts

See scripts/ for the set of custom commands/scripts enabled for our chat bot.

Note for screenshots: Our chatbot was previously named "toby".

calendar-add.coffee

This command allows any member of our Slack team to easily add events to a shared community Google calendar via:

>>> @ourbot gcal add https://eventbrite.com/xxxxxxxxxxxxx

This depends on another small service for parsing event data from urls: https://github.com/CivicTechTO/event-metadata-parser

For now, this service only knows how to make sense of events on the EventBrite and Universe platforms, but it could be improved to cover other platforms.

collab-tweeter.coffee

This script watches for Twitter links in top-level channels, and offered to RT from organizational account

screenshot of chat bot offering to tweet

quicklink-gsheet-lookup.coffee

This bot command recognizes messages of the format !keyword and looks up the keyword in a designated spreadsheet (like this one). It replies with the URL. Using !!keyword will reply with a hidden message than only the user who typed the message will see.

This relates to a scheduled task that we run, which updates our shortlinks from this spreadsheet: https://github.com/civictechto/civictechto-scripts#gsheet2shortlinkspy

sms-doorbell.coffee

We have an internet number set up to notify us our chat channel whenever someone texts us. We use this as a doorbell at meetups, so that all organizers can easily take responsibility for answering and dealing with issues.

It lives in its own code repository, so please see the civictechto/hubot-sms-doorbell README for full details

task-runner.coffee

This bot command is used to manually kickstart scripted jobs or tasks, which are otherwise usually scheduled to run at certain times. These scripts are run by CircleCI, and in our case, are defined in the CivicTechTO/civictechto-scripts repo and accompanying config file. The command allows this ability through the use of CivicTechTO/circleci-job-runner, a small app that offers an API for initiating these runs. There is no authentication on these tasks, and so it's assumed that all tasks are safe to run at any time.

screenshot of task-runner chatbot command

livestream.coffee

Screenshot of interacting with the livestream command

This command is intended to make it easy for almost anyone to run livestreaming. It offers commands for:

  1. assisting with instructions and configuration,
  2. setting the event title on the video

Contributing

This app is hosted on the Heroku platform, and configured using their automatic deployment feature.

This means that pushing or merging changes specifically to the master branch will make the changes live within several minutes.

FAQ

How do a rename this chatbot?

You'll need to change the name in several places, some of which are critical โญ and some of which are just to keep things consistent:

Can I rename the Heroku app?

Yes, but just note that you'll need to update some configuration for our SMS doorbell. Specifically, you'll need to re-point our internet number's SMS URL Callback. Details on this configuration/setup linked from CivicTechTO/hubot-sms-doorbell.

civictechto-chatbot's People

Contributors

patcon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.