user app test

This commit is contained in:
Stachelbeere1248 2024-11-16 00:48:24 +01:00
parent 4191e78ac7
commit 2a746c1188
Signed by: Stachelbeere1248
SSH key fingerprint: SHA256:IozEKdw2dB8TZxkpPdMxcWSoWTIMwoLaCcZJ1AJnY2o

View file

@ -253,11 +253,11 @@ pub(crate) async fn list(ctx: Context<'_>, user: Option<User>) -> Result<(), Err
} }
#[poise::command(context_menu_command="Account list")] #[poise::command(context_menu_command="Account list")]
pub(crate) async fn context_list(ctx: Context<'_>, m: Message) -> Result<(), Error> { pub(crate) async fn context_list(ctx: Context<'_>, u: User) -> Result<(), Error> {
ctx.defer_ephemeral().await?; ctx.defer_ephemeral().await?;
cooldown(&ctx, 600, 300)?; cooldown(&ctx, 600, 300)?;
let pool: &Pool<Sqlite> = &ctx.data().sqlite_pool; let pool: &Pool<Sqlite> = &ctx.data().sqlite_pool;
let s: String = list_string(pool, &m.author).await?; let s: String = list_string(pool, &u).await?;
ctx.send( ctx.send(
CreateReply::default() CreateReply::default()
.content(s) .content(s)