buscemi/src/main.rs

24 lines
776 B
Rust
Raw Normal View History

2023-02-28 22:50:56 +00:00
mod commands;
2023-02-28 04:30:14 +00:00
2023-02-28 22:50:56 +00:00
use poise::serenity_prelude as serenity;
2023-02-28 04:30:14 +00:00
#[tokio::main]
async fn main() {
2023-02-28 22:50:56 +00:00
let options = poise::FrameworkOptions {
commands: commands::commands(),
..Default::default()
};
2023-02-28 04:30:14 +00:00
let framework = poise::Framework::builder()
2023-02-28 22:50:56 +00:00
.options(options)
2023-02-28 04:30:14 +00:00
.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?;
2023-02-28 22:50:56 +00:00
Ok(Default::default())
2023-02-28 04:30:14 +00:00
})
});
2023-02-28 22:50:56 +00:00
println!("it's beneath me. i'm mr. pink. let's move on.");
2023-02-28 04:30:14 +00:00
framework.run().await.unwrap();
}