conjugate verb

This commit is contained in:
2025-02-11 17:30:54 -05:00
parent 3d810cfea3
commit d5abbd50c5

View File

@@ -61,12 +61,12 @@ where
#[poise::command(slash_command, prefix_command)] #[poise::command(slash_command, prefix_command)]
pub async fn streak(ctx: Context<'_>, user: Option<User>) -> Result<(), Error> { pub async fn streak(ctx: Context<'_>, user: Option<User>) -> Result<(), Error> {
let db = &ctx.data().database; let db = &ctx.data().database;
let (user, name) = match user { let (user, who) = match user {
Some(user) => (user.id, user.display_name().to_string()), Some(user) => (user.id, format!("{} has", user.display_name())),
None => (ctx.author().id, "You".to_string()), None => (ctx.author().id, "You have".to_string()),
}; };
ctx.reply(format!("{name} have a daily streak of **{}**", get_streak(db, user).await?.unwrap_or(0))).await?; ctx.reply(format!("{who} a daily streak of **{}**", get_streak(db, user).await?.unwrap_or(0))).await?;
Ok(()) Ok(())
} }