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:
parent
8108f5cd27
commit
589238570a
2 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ use serenity::all::{CreateEmbed, CreateEmbedFooter, ReactionType};
|
|||
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.
|
||||
#[poise::command(slash_command, prefix_command, guild_only)]
|
||||
#[poise::command(slash_command, guild_only)]
|
||||
pub async fn poll(
|
||||
ctx: Ctx<'_>,
|
||||
#[description = "Poll question"] question: String,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ fn parse_duration(input: &str) -> Option<u64> {
|
|||
}
|
||||
|
||||
/// `/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(
|
||||
ctx: Ctx<'_>,
|
||||
#[description = "Duration, e.g. 30s, 10m, 2h, 1d"] duration: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue