aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meme/history.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/meme/history.rs')
-rw-r--r--src/commands/meme/history.rs23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/commands/meme/history.rs b/src/commands/meme/history.rs
index cfd78df..335603f 100644
--- a/src/commands/meme/history.rs
+++ b/src/commands/meme/history.rs
@@ -48,13 +48,8 @@ lazy_static! {
static CLEAN_DATE_FORMAT: &str = "%b %-e %Y";
-#[poise::command(
- slash_command,
- prefix_command,
- guild_only,
- category = "memes",
- aliases("what", "hwaet", "hwæt")
-)]
+/// Print info about the last meme.
+#[poise::command(prefix_command, guild_only, category = "memes", aliases("what", "hwaet", "hwæt"))]
pub async fn wat(ctx: PoiseContext<'_>) -> anyhow::Result<()> {
let mut conn = connection().await?;
@@ -108,7 +103,8 @@ pub async fn wat(ctx: PoiseContext<'_>) -> anyhow::Result<()> {
Ok(())
}
-#[poise::command(slash_command, prefix_command, guild_only, category = "memes", aliases("hist"))]
+/// Print recent memes and who invoked them.
+#[poise::command(prefix_command, guild_only, category = "memes", aliases("hist"))]
pub async fn history(ctx: PoiseContext<'_>, n: Option<usize>) -> anyhow::Result<()> {
let n = n.unwrap_or(CONFIG.default_hist);
@@ -204,7 +200,8 @@ pub async fn history(ctx: PoiseContext<'_>, n: Option<usize>) -> anyhow::Result<
Ok(())
}
-#[poise::command(slash_command, prefix_command, guild_only, category = "memes", aliases("stat"))]
+/// Print stats about the meme database.
+#[poise::command(prefix_command, guild_only, category = "memes", aliases("stat"))]
pub async fn stats(ctx: PoiseContext<'_>) -> anyhow::Result<()> {
use db;
use serenity::model::{
@@ -276,7 +273,8 @@ and *{}* was the most-memed overall ({})"#,
Ok(())
}
-#[poise::command(slash_command, prefix_command, guild_only, category = "memes")]
+/// Print stats about memers.
+#[poise::command(prefix_command, guild_only, category = "memes")]
pub async fn memers(ctx: PoiseContext<'_>) -> anyhow::Result<()> {
use serenity::model::id::UserId;
@@ -310,6 +308,11 @@ pub async fn memers(ctx: PoiseContext<'_>) -> anyhow::Result<()> {
Ok(())
}
+/// Look up a meme by title or content.
+///
+/// Can pass:
+/// - `by=username` or `creator=username` to look up memes created by a specific user.
+/// - `age=new` or `age=old` to sort the result by age.
#[poise::command(prefix_command, guild_only, category = "memes")]
pub async fn query(ctx: PoiseContext<'_>, rest: util::RestVec) -> anyhow::Result<()> {
use regex::Regex;