[Add][Change] Framework-API, Core 添加 Message 类型作为消息元素的基类, BotCode 继承 Message, AbstractBotCode 实现 BotCode 的相关方法细节;

[Add] Message, MessageChain 添加 Message 接口作为消息元素的基类, 添加 MessageChain 用于链接消息元素;
[Change] BotCode, AbstractBotCode BotCode 继承 Message 接口以作为消息的一部分, AbstractBotCode 实现部分方法细节;
[Add] BasicBotCode 适配调整, 添加新的构造方法;
This commit is contained in:
2020-11-19 22:12:43 +08:00
parent 1853461f09
commit b2fc196830
5 changed files with 166 additions and 1 deletions

View File

@ -19,9 +19,11 @@ package net.lamgc.cgj.bot.framework.base;
import net.lamgc.cgj.bot.framework.Platform;
import net.lamgc.cgj.bot.framework.message.AbstractBotCode;
import net.lamgc.cgj.bot.framework.message.BotCode;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Map;
/**
* ContentGrabbingJi 内部 BotCode 实现.
@ -32,6 +34,18 @@ public class BasicBotCode extends AbstractBotCode {
private final static Platform PLATFORM = new Platform("ContentGrabbingJi", "CGJ");
public BasicBotCode(String functionName) {
super(functionName);
}
public BasicBotCode(BotCode botCode) {
super(botCode);
}
public BasicBotCode(String functionName, Map<String, String> functionProperties) {
super(functionName, functionProperties);
}
@Override
public Platform getPlatform() {
return PLATFORM;