完成基本功能转移

This commit is contained in:
2024-05-04 17:26:27 +08:00
parent 3b52742ac1
commit 5a7382d02c
89 changed files with 2642 additions and 604 deletions

View File

@@ -0,0 +1,53 @@
package com.yutou.napcat.handle;
import lombok.Data;
import java.lang.reflect.Type;
public class Text extends BaseHandle<Text.TextInfo> {
public Text() {
super("text");
}
public Text(String text) {
super("text");
data = new TextInfo(text + "\n");
}
public Text(String text, boolean isNewLine) {
super("text");
if (isNewLine) {
data = new TextInfo(text + "\n");
} else {
data = new TextInfo(text);
}
}
public Text(boolean isNewLine, String... text) {
super("text");
StringBuilder sb = new StringBuilder();
for (String s : text) {
sb.append(s);
}
if (isNewLine) {
data = new TextInfo(sb + "\n");
} else {
data = new TextInfo(sb.toString());
}
}
@Override
public String toString() {
return data.text;
}
@Data
public static class TextInfo {
String text;
public TextInfo(String text) {
this.text = text;
}
}
}