From d408fa25619f3524dcebc0e90488e16035980618 Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Mon, 6 May 2024 17:16:43 +0800 Subject: [PATCH] for UserRandom requires the surrounding space between 'or' to avoid mismatches. --- gradle.properties | 2 +- .../scala/cc/sukazyo/cono/morny/bot/event/OnUserRandom.scala | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6a243e3..6cf6cfc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ MORNY_ARCHIVE_NAME = morny-coeur MORNY_CODE_STORE = https://github.com/Eyre-S/Coeur-Morny-Cono MORNY_COMMIT_PATH = https://github.com/Eyre-S/Coeur-Morny-Cono/commit/%s -VERSION = 1.3.4-dev1 +VERSION = 1.3.4-dev2 USE_DELTA = false VERSION_DELTA = diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/event/OnUserRandom.scala b/src/main/scala/cc/sukazyo/cono/morny/bot/event/OnUserRandom.scala index 10bd70a..ac05d02 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/event/OnUserRandom.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/bot/event/OnUserRandom.scala @@ -13,9 +13,8 @@ class OnUserRandom (using coeur: MornyCoeur) { object RandomSelect extends EventListener { - - private val USER_OR_QUERY = "^(.+)(?:还是|or)(.+)$" r - private val USER_IF_QUERY = "^(.+)(?:吗\\?|?|\\?|吗?)$" r + private val USER_OR_QUERY = "^(.+)(?:还是| or )(.+)$"r + private val USER_IF_QUERY = "^(.+)(?:吗\\?|?|\\?|吗?)$"r override def onMessage (using event: EventEnv): Unit = { import event.update