GiphyBot for Braid
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
Cargo.lock
Cargo.toml
README.md
message_test.sh
partial-message.msgpack
test-message.msgpack
test-message2.msgpack
test_giphy_msg.msgpack

README.md

Setting up giphybot

Giphybot is written in Rust, so you'll probably want to use rustup to install the rust toolchain if you don't already have it set up. Alternatively, you can use a pre-built binary.

Create a configuration toml file with the app's configuration. It should look like this:

[general]
port = "9999"

[giphy]
api_key = "GIPHY_API_KEY"

[braid]
name = "nameofthisbotonbraid"
api_url = "https://api.braid.chat/bots/message"
app_id = "BOT_BRAID_ID"
token = "BOT_BRAID_TOKEN"

There is a public giphy api key to use for testing: dc6zaTOxFJmzC

Specify the file as the first command-line argument, e.g.

$ giphybot conf.toml

You can run the bot for testing by doing cargo run conf.toml.

To deploy, build with cargo build --release then upload the generated binary from target/release/giphybot. If building on a different architecture than you'll be deploying to, look into rustup cross-compilation.