Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zedseven/radium

A music & dice bot made for personal use.
https://github.com/zedseven/radium

dice-roller discord dnd dnd-tools lavalink music serenity sponsorblock

Last synced: about 1 month ago
JSON representation

A music & dice bot made for personal use.

Awesome Lists containing this project

README

        

# Radium (Radio) Bot
Logo

[![License: GPLv3](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE.md)

A music & dice bot made for personal use.

I made this for use by my friends and I on [Discord](https://discord.com/).
You're welcome to use it if you want to, but it isn't intended for
widespread use.

## Infrastructure
- [Poise](https://github.com/kangalioo/poise)
- [Serenity](https://github.com/serenity-rs/serenity)
- [Songbird](https://github.com/serenity-rs/songbird)
- [Lavalink](https://github.com/freyacodes/Lavalink) (with the [lavalink-rs](https://gitlab.com/vicky5124/lavalink-rs) Rust wrapper).
- [Diesel](https://diesel.rs/)
- [SQLite](https://sqlite.org/index.html)
- [SponsorBlock](https://sponsor.ajay.app/) (with my [sponsor-block-rs](https://github.com/zedseven/sponsor-block-rs) Rust wrapper).

## SponsorBlock Integration
While playing videos from YouTube, the bot will automatically skip sponsored segments,
intros and outros, non-music sections in music videos, and more.

This uses the fantastic [SponsorBlock](https://sponsor.ajay.app/) service, which is run on curated user-submitted
timestamps.

## Dice Rolling
Parses the roll expression into [Reverse Polish Notation](https://en.wikipedia.org/wiki/Reverse_Polish_notation),
then processes dice rolls into numbers (by rolling) and calculates the result.
Because of this, it supports arbitrary mathematical expressions - even with no dice
involved.

For example, you can do crazy stuff like this:
```
-roll (3d20b2 + 11) ^ (d4 * 2) / 2d100w
```

Obviously this is beyond what a typical game would ever really require, but it was fun
to implement.

The format for dice rolls is `d`.
You can also do (dis)advantage with either [**b**]est or [**w**]orst after the roll,
followed by the number of best/worst rolls you want to keep.

For example:
`6d8b4` to roll 6 d8s and keep the best 4.