完善了owner的相关指令;

添加了群聊黑名单功能;
完善了清理线程超时时间以及最近操作时间的相关功能;
改正了之前正则表达式中出现的错误。
This commit is contained in:
slhaf
2024-10-03 23:18:31 +08:00
parent 3d0ad90ef7
commit 883bd39026
12 changed files with 429 additions and 82 deletions

View File

@@ -2,6 +2,7 @@ package plugin.pojo;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
public class Config {
/**
@@ -23,6 +24,7 @@ public class Config {
private String bot;
private String timeout;
private String timeCheck;
private List<Long> blacklist;
/**
* 自定义预设
@@ -44,6 +46,19 @@ public class Config {
this.customCommands = customCommands;
}
public Config(String apikey, String accessKeyId, String accessKeySecret, String owner, String defaultModel, String bot, String timeout, String timeCheck, List<Long> blacklist, LinkedHashMap<String, String> customCommands) {
this.apikey = apikey;
this.accessKeyId = accessKeyId;
this.accessKeySecret = accessKeySecret;
this.owner = owner;
this.defaultModel = defaultModel;
this.bot = bot;
this.timeout = timeout;
this.timeCheck = timeCheck;
this.blacklist = blacklist;
this.customCommands = customCommands;
}
/**
* 获取
* @return apikey
@@ -192,4 +207,20 @@ public class Config {
public String toString() {
return "Config{apikey = " + apikey + ", accessKeyId = " + accessKeyId + ", accessKeySecret = " + accessKeySecret + ", owner = " + owner + ", modelNormal = " + defaultModel + ", modelCode = " + ", bot = " + bot + ", timeout = " + timeout + ", timeCheck = " + timeCheck + ", customCommands = " + customCommands + "}";
}
/**
* 获取
* @return blacklist
*/
public List<Long> getBlacklist() {
return blacklist;
}
/**
* 设置
* @param blacklist
*/
public void setBlacklist(List<Long> blacklist) {
this.blacklist = blacklist;
}
}