alice v0.2.1 Alice.Conn
Alice.Conn defines a struct that is used throughout alice to hold state during the lifetime of a message handling.
An Alice.Conn struct contains 3 things: message
, the incoming message
that is currently being handled; slack
, a data structure from the Slack
library that holds all the information about the Slack instance; and state
,
which is the state of the bot that is persisted between messages. State
defaults to an in-memory Map, but may be configured to be backed by Redis.
The Alice.Conn module also contains several helper functions that operate on Conn structs.
Summary
Functions
Used internally to add the regex captures to the message
Builds a string to use as an @reply back to the user who sent the message
Returns a boolean depending on whether or not the incoming message is a command
Used internally to delete namespaced state
Used internally to get namespaced state
Convenience function to make a new Alice.Conn
struct
Used internally to put namespaced state
Returns the name of the user for the incoming message
Functions
Convenience function to make a new Alice.Conn
struct