Skip to content

Commit

Permalink
Update instruct string contains to matches
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksgata committed Nov 10, 2022
1 parent 5b58081 commit 397eea4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ private String trackInstructCases(MessageData<?> data) throws DiceInstructExcept
//仔细的指令检测方法
private boolean instructMessageCheck(String message, String instructStr) {
//具体的逻辑判定 该检测主要作为 统一的指令检测 若单条指令需要作检测,请在@InstrctionReflex的方法中实现
return message.contains(instructStr);
//需要正则匹配开头,而不是包含其中。
return message.matches("^" + instructStr + ".*$");
}


Expand Down

0 comments on commit 397eea4

Please sign in to comment.