24 lines
776 B
Rust
24 lines
776 B
Rust
mod commands;
|
|
|
|
use poise::serenity_prelude as serenity;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let options = poise::FrameworkOptions {
|
|
commands: commands::commands(),
|
|
..Default::default()
|
|
};
|
|
let framework = poise::Framework::builder()
|
|
.options(options)
|
|
.token(std::env::var("DISCORD_TOKEN").expect("failed to find DISCORD_TOKEN in env"))
|
|
.intents(serenity::GatewayIntents::non_privileged())
|
|
.setup(|ctx, _ready, framework| {
|
|
Box::pin(async move {
|
|
poise::builtins::register_globally(ctx, &framework.options().commands).await?;
|
|
Ok(Default::default())
|
|
})
|
|
});
|
|
println!("it's beneath me. i'm mr. pink. let's move on.");
|
|
framework.run().await.unwrap();
|
|
}
|