Skip to content

BlakeWilliams/slack_markov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Markov

This is a Rust program that connects to Slack, uses the Slack message search API to find all messages that a user has posted them and to add them to a markov chain. After the messages are parsed the program connects to Slack as a bot user and responds to @ mentions to it with a phrase generated from the markov chain.

Building

On OS X OpenSSL may not compile without exporting some environment variables. If you run into issues with it you can run the following:

export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
export OPENSSL_LIB_DIR=/usr/local/opt/openssl/lib
export DEP_OPENSSL_INCLUDE=/usr/local/opt/openssl/include

Make sure the program builds by running cargo build.

Running

The bot expects 3 environment variables to be present:

  • BOT_TOKEN - Token for the bot integration
  • API_TOKEN - Token that gives access to the search API. You can get this token from here
  • SLACK_USERNAME - Username of whose messages you want input into the markov chain

With these environment variables set you can run cargo run --release

About

Make a markov chain bot using a person's Slack history

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages