From cee2e47b6c9cdcad32b75957ce74ee8a4dfab0ee Mon Sep 17 00:00:00 2001 From: natto1784 Date: Sat, 19 Feb 2022 15:11:58 +0530 Subject: [PATCH] cadd: use a better delimiter --- src/commands/count.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/count.rs b/src/commands/count.rs index ad5dcca..61a7acb 100644 --- a/src/commands/count.rs +++ b/src/commands/count.rs @@ -39,7 +39,7 @@ pub async fn count(ctx: &Context, msg: &Message, args: Args) -> CommandResult { msg.reply( ctx, format!( - "No entry for '{}' found. If you want to add it, run `,cadd {}&`", + "No entry for '{}' found. If you want to add it, run `,cadd {} `", query, query ), ) @@ -74,9 +74,9 @@ pub async fn count(ctx: &Context, msg: &Message, args: Args) -> CommandResult { #[command] pub async fn cadd(ctx: &Context, msg: &Message, args: Args) -> CommandResult { let query: String = args.raw().collect::>().join(" "); - let queries = query.splitn(2, "&").collect::>(); + let queries = query.splitn(2, " ").collect::>(); if queries.len() != 2 { - msg.reply(ctx, "Please use the proper syntax: `,cadd &`\nIf you don't know what regex is, just do: `,cadd &`") + msg.reply(ctx, "Please use the proper syntax: `,cadd `\nIf you don't know what regex is, just do: `,cadd `") .await?; return Ok(()); }