Skip to content

Commit

Permalink
Trim for multiple part command
Browse files Browse the repository at this point in the history
  • Loading branch information
Simba98 committed Dec 7, 2023
1 parent 845122a commit 42f60e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static boolean isVar(String msg) {
public static String varParse(CustomCmd customCmd, String cmd) {
String returnCmd = "";
if (isVar(cmd)) {//存在变量
val replaceContent = customCmd.getCmdContent().split("%")[0].replaceAll(" ", "");
val replaceContent = customCmd.getCmdContent().split("%")[0].trim();
returnCmd = cmd.replace(customCmd.getCmdAlies(), replaceContent);//返回q群指令
} else returnCmd = customCmd.getCmdContent();//返回普通自定义命令指令
return returnCmd;
Expand Down

0 comments on commit 42f60e9

Please sign in to comment.