fix for multiline commands

This commit is contained in:
jude 2020-10-26 10:16:38 +00:00
parent 864a6fc87c
commit 19b3eb067e
3 changed files with 5 additions and 3 deletions

2
Cargo.lock generated
View File

@ -1179,7 +1179,7 @@ dependencies = [
[[package]] [[package]]
name = "reminder_rs" name = "reminder_rs"
version = "1.0.1" version = "1.0.2"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"async-trait", "async-trait",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "reminder_rs" name = "reminder_rs"
version = "1.0.1" version = "1.0.2"
authors = ["jellywx <judesouthworth@pm.me>"] authors = ["jellywx <judesouthworth@pm.me>"]
edition = "2018" edition = "2018"

View File

@ -245,6 +245,7 @@ impl RegexFramework {
self.command_matcher = RegexBuilder::new(match_string.as_str()) self.command_matcher = RegexBuilder::new(match_string.as_str())
.case_insensitive(self.case_insensitive) .case_insensitive(self.case_insensitive)
.dot_matches_new_line(true)
.build() .build()
.unwrap(); .unwrap();
} }
@ -278,6 +279,7 @@ impl RegexFramework {
self.dm_regex_matcher = RegexBuilder::new(match_string.as_str()) self.dm_regex_matcher = RegexBuilder::new(match_string.as_str())
.case_insensitive(self.case_insensitive) .case_insensitive(self.case_insensitive)
.dot_matches_new_line(true)
.build() .build()
.unwrap(); .unwrap();
} }
@ -350,7 +352,7 @@ impl Framework for RegexFramework {
{ {
let member = guild.member(&ctx, &msg.author).await.unwrap(); let member = guild.member(&ctx, &msg.author).await.unwrap();
if let Some(full_match) = self.command_matcher.captures(&msg.content[..]) { if let Some(full_match) = self.command_matcher.captures(&msg.content) {
if check_prefix(&ctx, &guild, full_match.name("prefix")).await { if check_prefix(&ctx, &guild, full_match.name("prefix")).await {
let pool = ctx let pool = ctx
.data .data