public class BaseInterActionEvent extends Object implements InterActionEvent
| Constructor and Description |
|---|
BaseInterActionEvent(Bot bot,
com.alibaba.fastjson.JSONObject metaData) |
| Modifier and Type | Method and Description |
|---|---|
Bot |
getBot()
事件所在bot
|
Integer |
getChatType()
0 频道场景,1 群聊场景,2 单聊场景
|
String |
getId()
事件id
|
InterAction |
getInterAction()
获得数据
|
com.alibaba.fastjson.JSONObject |
getMetadata()
获得元数据
|
void |
response(int code)
响应
0 成功 1 操作失败 2 操作频繁 3 重复操作 4 没有权限 5 仅管理员操作
测试未知异常 暂不可用 |
Result |
send(SendAble msg)
以各种方式 达到想要发送的效果
|
Result |
send(String text)
以JSON方式发送文本消息
|
Result |
send(String text,
RawMessage message)
以JSON方式发送文本消息并引用指定消息
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClassNamepublic BaseInterActionEvent(Bot bot, com.alibaba.fastjson.JSONObject metaData)
public Result send(String text, RawMessage message)
Senderpublic com.alibaba.fastjson.JSONObject getMetadata()
EventgetMetadata in interface Eventpublic Integer getChatType()
InterActionEventgetChatType in interface InterActionEventpublic InterAction getInterAction()
InterActionEventgetInterAction in interface InterActionEventpublic void response(int code)
InterActionEventresponse in interface InterActionEventCopyright © 2025. All rights reserved.