Package top.mrxiaom.overflow.contact
Interface RemoteBot
-
- All Implemented Interfaces:
public interface RemoteBot
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRemoteBot.Companion
-
Method Summary
Modifier and Type Method Description abstract StringexecuteAction(String actionPath, String params)执行自定义动作详见 Onebot 11 公开 API。 abstract StringexecuteAction(ActionContext context, String params)执行自定义动作详见 Onebot 11 公开 API 和 go-cqhttp 公开 API。用例: // kotlin val result = onebot.executeAction( context = ActionContext.build("get_guild_list") { throwExceptions(true) }, params = null )// java String result = onebot.executeAction( ActionContext.build("get_guild_list", builder -> { builder.throwExceptions(true); }), null );abstract UnitsendRawWebSocketMessage(String message)发送自定义 WebSocket 消息 abstract UnitsendRawWebSocketMessage(ByteArray message)发送自定义 WebSocket 消息 abstract MessageChaingetMsg(Integer messageId)通过消息id获取消息,并反序列化为 mirai 格式消息 abstract StringgetAppName()Onebot 实现名称 abstract StringgetAppVersion()Onebot 实现版本 abstract BooleangetNoPlatform()配置中是否已禁止 Overflow 调用网络接口 -
-
Method Detail
-
executeAction
abstract String executeAction(String actionPath, String params)
执行自定义动作
详见 Onebot 11 公开 API。
- Parameters:
actionPath- API请求路径params- 请求参数,可为空
-
executeAction
abstract String executeAction(ActionContext context, String params)
执行自定义动作
详见 Onebot 11 公开 API 和 go-cqhttp 公开 API。
用例:
// kotlin val result = onebot.executeAction( context = ActionContext.build("get_guild_list") { throwExceptions(true) }, params = null )// java String result = onebot.executeAction( ActionContext.build("get_guild_list", builder -> { builder.throwExceptions(true); }), null );- Parameters:
context- 自定义请求上下文,可控制抛出异常、忽略标准格式等选项params- 请求参数,可为空
-
sendRawWebSocketMessage
abstract Unit sendRawWebSocketMessage(String message)
发送自定义 WebSocket 消息
- Parameters:
message- 消息内容
-
sendRawWebSocketMessage
abstract Unit sendRawWebSocketMessage(ByteArray message)
发送自定义 WebSocket 消息
- Parameters:
message- 消息内容
-
getMsg
abstract MessageChain getMsg(Integer messageId)
通过消息id获取消息,并反序列化为 mirai 格式消息
- Parameters:
messageId- 消息id
-
getAppName
abstract String getAppName()
Onebot 实现名称
-
getAppVersion
abstract String getAppVersion()
Onebot 实现版本
-
getNoPlatform
abstract Boolean getNoPlatform()
配置中是否已禁止 Overflow 调用网络接口
-
-
-
-