From a38f6024c17cedfef5739d2afc3c13448ec0d709 Mon Sep 17 00:00:00 2001 From: jude Date: Sat, 3 Sep 2022 15:40:29 +0100 Subject: [PATCH] Migrate natural commands --- src/commands/moderation_cmds.rs | 101 +++++++++++++++++++++++++------- 1 file changed, 79 insertions(+), 22 deletions(-) diff --git a/src/commands/moderation_cmds.rs b/src/commands/moderation_cmds.rs index dcdfe70..b8bf321 100644 --- a/src/commands/moderation_cmds.rs +++ b/src/commands/moderation_cmds.rs @@ -5,6 +5,7 @@ use chrono_tz::{Tz, TZ_VARIANTS}; use lazy_regex::regex; use levenshtein::levenshtein; use poise::{serenity_prelude::command::CommandOptionType, CreateReply}; +use regex::Captures; use serde_json::{json, Value}; use crate::{ @@ -635,27 +636,6 @@ pub async fn migrate_macro(ctx: Context<'_>) -> Result<(), Error> { Ok(()) } -// const REGEX_REMIND_COMMAND: Regex = RegexBuilder::new( -// r#"(?P(?:<@\d+>\s+|<@!\d+>\s+|<#\d+>\s+)*)(?P