fix: drop prefix_command from /poll and /remind

Multi-word String params can't be parsed by poise's whitespace-based
prefix parser without quoting, causing 'Too many arguments' on !poll
and !remind. Slash command already handles this correctly via
structured params, so prefix mode is dropped for these two.
This commit is contained in:
loki5512344 2026-09-11 12:54:30 +02:00
parent 8108f5cd27
commit 589238570a
Signed by: boba
GPG key ID: 253067914055423B
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ use serenity::all::{CreateEmbed, CreateEmbedFooter, ReactionType};
const NUMBER_EMOJIS: [&str; 10] = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"]; const NUMBER_EMOJIS: [&str; 10] = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"];
/// `/poll <question> <options>` - options separated by `;` (2-10). Adds number reactions. /// `/poll <question> <options>` - options separated by `;` (2-10). Adds number reactions.
#[poise::command(slash_command, prefix_command, guild_only)] #[poise::command(slash_command, guild_only)]
pub async fn poll( pub async fn poll(
ctx: Ctx<'_>, ctx: Ctx<'_>,
#[description = "Poll question"] question: String, #[description = "Poll question"] question: String,

View file

@ -19,7 +19,7 @@ fn parse_duration(input: &str) -> Option<u64> {
} }
/// `/remind <duration> <message>` - e.g. `/remind 10m stretch break`. Max 7 days. /// `/remind <duration> <message>` - e.g. `/remind 10m stretch break`. Max 7 days.
#[poise::command(slash_command, prefix_command, guild_only)] #[poise::command(slash_command, guild_only)]
pub async fn remind( pub async fn remind(
ctx: Ctx<'_>, ctx: Ctx<'_>,
#[description = "Duration, e.g. 30s, 10m, 2h, 1d"] duration: String, #[description = "Duration, e.g. 30s, 10m, 2h, 1d"] duration: String,