This is a simple template for make a Discord Bot with Slash Commands using Serenity and Poise.
Setup (with nix flakes)
- Create a
.env
following.env.example
- Run
direnv allow
- Ready to go!
- Create a
.env
following.env.example
- Add
dotenvy
to dependencies
cargo add dotenvy
or modify Cargo.toml
[dependencies]
dotenvy = "0.15"
- Use
dotenvy
inmain.rs
#[tokio::main]
pub async fn main() {
dotenvy::dotenv().unwrap();
//...
}
- Ready to go!