large refactor: reorganize code

This commit is contained in:
2024-10-11 20:33:12 -04:00
parent ecbf4cad06
commit 4e08e25575
10 changed files with 240 additions and 183 deletions

18
src/commands/yeehaw.rs Normal file
View File

@@ -0,0 +1,18 @@
use crate::common::{Context, Error};
use std::iter;
/// Pardner
#[poise::command(slash_command, prefix_command)]
pub async fn yeehaw(ctx: Context<'_>,
#[min = 1]
width: Option<usize>,
#[min = 1]
height: Option<usize>) -> Result<(), Error>
{
ctx.reply(iter::repeat("\u{1F920}".to_string().repeat(width.unwrap_or(1)))
.take(height.unwrap_or(1))
.collect::<Vec<_>>()
.join("\n")).await?;
Ok(())
}