A Slack bot for DRF! Check out the readme here for an overview.
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;
}
@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!