# GoMatrixBot Listens to matrix events and performs many actions: - Can upload text/images to a [snac2 instance](https://codeberg.org/grunfink/snac2) by reacting - Quote bot - React with a 📝 to store quotes in a database - Gifs / Weather / IMDB / Wiki / UrbanDictionary / XKCD searches - Downloads videos from links and uploads using yt-dlp - Fetches metar/tafs - Much more.. But this is constantly evolving proof of concept :) This project has evolved and not had much love, but it works for us. I have tried to document as much config/setup as possible but some things may be missing. ### Setup As I have build this an run it in an isolated LXC container - Beware, everything is set to run as root. You can change the config as needed. 1. [Install Go](https://go.dev/doc/install) 2. Clone repository + create directories + create environment file ```shell git clone git@github.com:idanoo/gomatrixbot.git ~/gomatrixbot cd ~/gomatrixbot/src && go build cmd/gomatrixbot/main.go mkdir -p ~/data/output mkdir -p ~/data/reaction_pics mkdir -p ~/data/the_greats echo 'MATRIX_HOST="" MATRIX_USERNAME="" MATRIX_PASSWORD="" MATRIX_ADMIN_ROOM="" GIPHY_API_KEY="" TENOR_API_KEY="" OPENWEATHERMAP_API_KEY="" SNAC_HOST="" SNAC_ACCESS_TOKEN="" ' > ~/data/environment ``` Why folders? Just so stuff can glob and not get mixed up! ```shell ~/data/output # This is used for temp files/uploads ~/data/reaction_pics # Used with .rb to generate text on images ~/data/the_greats # used with 📷️ to store a legendary image ``` ### Commands These may become outdated and may not _all_ work: ```shell 🤠 react to faceswap iamge 🍌 react to upload to 📝 react to quote message 🐫 react to save picture for future quote usage ☝️ react to set room topic 📷️ react to save picture for future lulz .r - Returns a random quote (can search quotes) .rb - Returns a random quote on a random bird pic (with optional search) .remindme