yellowtides / owenbot-hs

A utility bot written in Haskell for the Edinburgh Informatics Class of ‘24’s main messaging platform (Discord server).
https://yellowtid.es/owenbot-hs/
BSD 3-Clause "New" or "Revised" License
8 stars 7 forks source link
bot bot-discord haskell
Owenbot Logo

owenbot-hs

A neat Discord bot written in Haskell. Use with caution.

Features

Running/Developing Locally

Place a "config.json" file in ~/.config/owen (or %APP_DATA%/owen on Windows). Format is as given in "Config.hs".

All source code is formatted using brittany Version 0.13.1.2.

find src -type f -name "*.hs" -exec brittany --write-mode=inplace --config-file ./brittany.yaml {} \;

Cabal

Install and build all dependencies, and run the bot all with the command: cabal run owenbot-exe.

Run tests with cabal test.

Stack

Build with stack install. This compiles and installs the bot in one go. Run with owenbot-exe.

Alternatively, build and run with stack run owenbot-exe.

Run tests with stack test.

Nix

If you have nix installed, running stack install --nix will automatically ensure you get an environment with the correct system-level dependencies (namely zlib).

Docker

There is a Dockerfile included in this repo that basically runs the Stack build/exec process. However, it has not been used so the functionality cannot be vouched for.

Documentation | Commands

Try sending :helpme to the bot!

Generate Haddock documentation: stack haddock . --haddock-hyperlink-source