Git Product home page Git Product logo

18f-bot-facts's Introduction

18F-bot facts and responses

This repo holds facts and autoresponses that feed into 18F's internal slack bot, Charlie.

How these lists work

These lists are JSON files that are read by Charlie. After creating a list here, you'll also need to update Charlie's configuration to read it. (See the documentation about the random responder for configuration information. If you're just updating a list Charlie already knows about, you can skip this step.)

The JSON file must contain a single array. Each element of the array represents one possible response to the configured trigger. For example, dags.json represents all the responses for the "Dag Bot," or facts about 18F'ers dogs.

A response can either just be text or it can be a more complex object. If it is just text, you can specify an emoji to use as the bot's avatar by starting the text with the emoji. For example, the text ":cat: Cats are animals" would produce a message like this:

screenshot of bot response

If the text does not start with an emoji, the avatar will be the default for the bot, as configured in Charlie.

A response can also be a more complex object, specifying a name and avatar to use when posting along with the text of the response. For example:

{
  "name": "Dog in Disguise",
  "emoji": ":dog:",
  "text": "I am not a cat"
}

would produce a message like this:

screenshot of bot response

Note that if the bot is configured with a custom name in the Charlie configuration AND you set a name for this response, the bot's custom name is included in parentheses.

Contributing

See a short video demonstrating how to update the facts.

Changes must be submitted as pull requests, as the master branch is protected from direct edits. Pull requests must pass their tests before they can be merged - the tests just validate that the lists are correctly structured, so they should run pretty quickly.

Please read the contribution guidelines before submitting a pull request.

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

18f-bot-facts's People

Contributors

abrouilette avatar alexsobledotgov avatar annepetersen avatar brentryanjohnson avatar colinmurphy01 avatar dependabot-preview[bot] avatar emilytheis avatar gboone avatar jkrzy avatar juliaklindpaintner avatar lauraponce avatar mgwalker avatar mheadd avatar mogul avatar nkkl avatar randyhart avatar sawtoothwave avatar tbaxter-18f avatar toreyvanek1 avatar vdavez 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.