A Discord and Telegram bot written in Rust to enable easy access to a variety of University of Massachusetts, Amherst services. Currently, it provides the ability to search across the dining halls to check which foods are present on a given day, as well as information on room availability to ease studying.
For the issue tracker, see https://todo.sr.ht/~gbear605/umass_bot
To add it to your server, go to this link and authorize the bot.
The program requires a bot token to connect to Discord or Telegram. It does this using private token files (discord_token
and telegram_token
respectively) which can be acquired from Discord and Telegram.
Using: https://github.com/emk/rust-musl-builder
Docker needs to be installed.
- Set the alias for the builder:
alias rust-musl-builder='docker run --rm -it -v cargo-git:/home/rust/.cargo/git -v cargo-registry:/home/rust/.cargo/registry -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder:nightly-2019-06-08'
-
Start the Docker daemon (if it isn't already running)
-
Set up the file cache: (speeds up build time)
rust-musl-builder sudo chown -R rust:rust /home/rust/.cargo/git /home/rust/.cargo/registry
- Build: (this will download a linux docker image to compile in if it is not already downloaded)
Expect the build step to initially take about fifteen minutes, then to take a while (roughly a minute) each time after the first.
rust-musl-builder cargo build --bin telegram_client --release
rust-musl-builder cargo build --bin discord_client --release
rust-musl-builder cargo build --bin server --release
To update the container, run docker pull ekidd/rust-musl-builder:nightly-2019-06-08
The built files will be in target/x86_64-unknown-linux-musl/release