Skip to content

fng97/adventus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adventus

👋 Add me to your server!

Features

Documentation for each slash command pops up in Discord when you type / in a message box.

🎲 Roller

A simple dice roller. Here are some examples:

  • /roll (defaults to 1d20) returns: "@user rolled 10."
  • /roll sides: 20 returns: "@user rolled 13."
  • /roll sides: 6 rolls: 2 returns: "@user rolled 2, 5."

📯 Introductions

Plays a user's introduction sound when they join a voice channel. This is configurable with the following commands:

  • /set_intro - Add an introduction sound from an attachment
  • /clear_intro - Remove your introduction sound

Notes

  • Sounds are set on a per-guild basis.
  • The attachment video/audio length can be up to 5 seconds long.
  • The bot joins the voice channel (if not already present) to play the introduction sound.
  • The bot will stick around so that subsequent user joins can be announced faster.
  • The bot leaves the voice channel after 5 minutes of inactivity.

How does it work?

The previous incarnation of this bot used a serverless API and Discord Interactions to handle the /roll slash command without a Discord framework. I was pretty proud of that, but I wanted to add more features and learn more about Rust so (as they say) I rewrote it in Rust.

This version uses Serenity, Poise, and Songbird for the Discord client. They, along with ffmpeg and libopus, do all the heavy lifting.

Running Locally

Assuming you have Nix installed you can run the bot with:

nix develop --command bash -c 'INTROS_DIR="intros" DISCORD_TOKEN="<token>" cargo run'

About

A silly discord bot

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •