nitros12/calamity

Created Dec 23, 2020 · View the nitros12/calamity repository page

A library for writing discord bots in haskell

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

2

Lines of Code

1,585

From

Nov 18, 2018

To

Dec 16, 2020

About nitros12/calamity

Calamity is a Haskell library for building Discord bots that leverages Polysemy as its core effect system. This design choice allows developers to customize how the library handles certain features, such as caching, metrics collection, and logging, rather than being locked into predefined implementations. For instance, you can swap the default in-memory cache for a database-backed solution, integrate Prometheus for monitoring, or use custom logging via the di-polysemy library.

The library is more feature-rich and flexible than some alternatives but comes with increased complexity in its API. The project includes comprehensive documentation on Hackage and a blog post covering the fundamentals of bot development. Multiple example projects are available, ranging from minimal starter templates to production bots that demonstrate database integration, member role management, and command modularization.

Calamity also provides Nix support with a cachix cache available for users who prefer declarative builds. This makes it convenient for developers using the Nix ecosystem to build Discord bots without compiling dependencies from scratch.

Share this video