|
|
@@ -6,8 +6,6 @@ use serenity::{ |
|
|
|
}; |
|
|
|
|
|
|
|
extern crate serde_json; |
|
|
|
//use serde::{Deserialize, Serialize}; |
|
|
|
use serde_json::Result; |
|
|
|
|
|
|
|
extern crate regex; |
|
|
|
use regex::{Regex, RegexBuilder, Match}; |
|
|
@@ -88,7 +86,7 @@ impl CmdMacro { |
|
|
|
let macros: HashMap<u64, HashMap<String, String>> = serde_json::from_reader(reader).unwrap_or(HashMap::<u64, HashMap<String, String>>::new()); |
|
|
|
return CmdMacro { |
|
|
|
format: |
|
|
|
RegexBuilder::new(r#"^!macro\s+([A-Za-z0-9]+|"[^\s]+"|'[^\s]+')(?:\s+([A-Za-z0-9]+|"[^\s]+"|'[^\s]+')\s+(.+))?"#) |
|
|
|
RegexBuilder::new(r#"^!macro\s+([A-Za-z0-9]+|"[^\s]+"|'[^\s]+')(?:\s+([A-Za-z0-9]+|"[^\s]+"|'[^\s]+'))?(?:\s+(.+))?"#) |
|
|
|
.multi_line(true) |
|
|
|
.dot_matches_new_line(true) |
|
|
|
.case_insensitive(true) |
|
|
|