Giter VIP home page Giter VIP logo

drfbot's Introduction

DRFBot

A Slack bot for DRF! Check out the readme here for an overview.

Interactions

The entire bot is based around the notion of Interactions. Define new ones in src/interactions/ and extend BaseInteraction. Each interaction must define a array of patterns to listen for, an array of message types to act on, and a hook for responding. Types are below for reference.

type MessageType = 'direct_message' | 'ambient' | 'direct_mention' | 'mention';
type MessageTypes = 'message_received' | Array<MessageType>;
type Pattern = string | RegExp;
type Patterns = Array<Pattern> | Immutable.List<Pattern>;
type AsyncPatterns = Patterns | Promise<Patterns>;
type Hook = (bot: SlackBot, message: Message) => void;

interface Interaction {
  patterns: AsyncPatterns;
  messageTypes: MessageTypes;
  hook: Hook;
}

Current interactions

@channel's everyone echoing whatever was said that contains the phrase "ladies and gentlemen".

Example: Ladies and gents, I have an announcement!

Allows a partner to claim a currently-unassigned company which has applied on the site and is waiting in Trello.

Example: @drfbot claim TheNextGoogle

Broadcasts with a custom overview for any company that's mentioned.

Example: I'm super excited about Xperii!

Responds with an answer for any company whose point partners someone asks a question about.

Example: Who is the point partner for BrainSpec?

Responds with an answer for any company whose snapshot someone asks a question about.

Example: Where's the snapshot for BrainSpec?

Responds with a custom overview and Trello bot prompt for any company that is included in the query.

Example: @drfbot company Spyce

Send some love to another partner!

Example: Send some love to @yasyf!

drfbot's People

Contributors

yasyf 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.