(水) 补一点代码闲聊

This commit is contained in:
A.C.Sukazyo Eyre 2022-03-17 01:31:56 +08:00
parent ce53e70dfa
commit 653ba4c0a8
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD

View File

@ -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(