Skip to content

Commit

Permalink
🎨 Rename ArrayMsgUtils build function
Browse files Browse the repository at this point in the history
  • Loading branch information
MisakaTAT committed Apr 24, 2024
1 parent d136b42 commit 3faa0fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ public ArrayMsgUtils keyboard(Keyboard keyboard) {
return this;
}

public String build() {
return builder.stream().map(ArrayMsg::toCqCode).collect(Collectors.joining());
public String buildCQ() {
return builder.stream().map(ArrayMsg::toCQCode).collect(Collectors.joining());
}

public List<ArrayMsg> buildList() {
public List<ArrayMsg> build() {
return builder;
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/mikuac/shiro/model/ArrayMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ArrayMsg setRowType(String type) {
return this;
}

public String toCqCode() {
public String toCQCode() {
if ("text".equalsIgnoreCase(type)) {
return data.getOrDefault("text", "");
}
Expand All @@ -51,4 +51,5 @@ public String toCqCode() {
stringBuilder.append(']');
return stringBuilder.toString();
}

}

0 comments on commit 3faa0fe

Please sign in to comment.