Add breakdance and fix comments #3
6 changed files with 30 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
/target
|
||||
/res
|
||||
.env
|
||||
|
|
|
|||
21
src/commands/fun/breakdance.rs
Normal file
21
src/commands/fun/breakdance.rs
Normal 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(())
|
||||
}
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
pub mod breakdance;
|
||||
pub mod ping;
|
||||
pub mod roll;
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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<'_>,
|
||||
|
|
|
|||
|
|
@ -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| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue