Add breakdance and fix comments #3

Merged
alzalia merged 2 commits from dev into main 2025-08-31 17:14:03 +02:00
6 changed files with 30 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/target
/res
.env

View file

@ -0,0 +1,21 @@
use poise::CreateReply;
use serenity::all::CreateAttachment;
use crate::{Context, Error};
/// A bee will do a lil' breakdance
#[poise::command(slash_command, prefix_command)]
pub async fn breakdance(ctx: Context<'_>) -> Result<(), Error> {
let reply = CreateReply {
content: Some("Time to... BREAKDAAAAAAANCE".to_string()),
attachments: vec![
CreateAttachment::path("./res/breakdance_bee.webm")
.await
.unwrap(),
],
..Default::default()
};
ctx.send(reply).await?;
Ok(())
}

View file

@ -1,2 +1,3 @@
pub mod breakdance;
pub mod ping;
pub mod roll;

View file

@ -1,6 +1,6 @@
use crate::{Context, Error};
/// Displays your or another user's account creation date
/// Returns a pong
#[poise::command(slash_command, prefix_command)]
pub async fn ping(ctx: Context<'_>) -> Result<(), Error> {
let response = format!("pong {} !", ctx.author().display_name());

View file

@ -2,7 +2,7 @@ use crate::{Context, Error};
use rand::prelude::*;
/// Displays your or another user's account creation date
/// Will throw a dice of x faces
#[poise::command(slash_command, prefix_command)]
pub async fn roll(
ctx: Context<'_>,

View file

@ -13,7 +13,11 @@ async fn main() {
let framework = poise::Framework::builder()
.options(poise::FrameworkOptions {
commands: vec![commands::fun::ping::ping(), commands::fun::roll::roll()],
commands: vec![
commands::fun::ping::ping(),
commands::fun::roll::roll(),
commands::fun::breakdance::breakdance(),
],
..Default::default()
})
.setup(|ctx, _ready, framework| {