Reserve sound names beginning with '@'

Might want to use this in the future. Remove the /random command as it's dumb.
This commit is contained in:
claude Bot committed 2023-10-21 17:50:48 +01:00
1 parent 6d324e10cb
commit d3e00247bd
2 files changed
+8 -30

No files matched your search

-25
View File
@@ -292,28 +292,3 @@ pub async fn search_sounds(
Ok(())
}
/// Show a page of random sounds
#[poise::command(slash_command, rename = "random", guild_only = true)]
pub async fn show_random_sounds(ctx: Context<'_>) -> Result<(), Error> {
let search_results = sqlx::query_as_unchecked!(
Sound,
"
SELECT name, id, public, server_id, uploader_id
FROM sounds
WHERE public = 1
ORDER BY rand()
LIMIT 25
"
)
.fetch_all(&ctx.data().database)
.await?;
ctx.send(|m| {
*m = format_search_results(search_results);
m
})
.await?;
Ok(())
}