From 653ba4c0a849a46dc80bd389cad98386b96f9417 Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Thu, 17 Mar 2022 01:31:56 +0800 Subject: [PATCH] =?UTF-8?q?(=E6=B0=B4)=20=E8=A1=A5=E4=B8=80=E7=82=B9?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=97=B2=E8=81=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cc/sukazyo/cono/morny/bot/event/OnUserRandoms.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserRandoms.java b/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserRandoms.java index cd90b67..3655a97 100644 --- a/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserRandoms.java +++ b/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserRandoms.java @@ -26,6 +26,9 @@ public class OnUserRandoms extends EventListener { if (preProcess.length > 1) return false; final String query = preProcess[0]; + // ----- START CODE BLOCK COMMENT ----- + // 这里实现思路和代码优化有至少一半是 copilot 和 IDEA 提供的 + // 实现思路都可以从人类手里抢一半贡献太恐怖了aba String result = null; final Matcher matcher; if (query.contains("还是")) { @@ -36,6 +39,7 @@ public class OnUserRandoms extends EventListener { if (matcher.find()) { result = ThreadLocalRandom.current().nextBoolean() ? matcher.group(1) : matcher.group(2); } + // ----- STOP CODE BLOCK COMMENT ----- if (result == null) return false; MornyCoeur.extra().exec(new SendMessage(