armoe-project / qqbot-sdk Goto Github PK
View Code? Open in Web Editor NEW适用于 Kotlin/Java 的 QQ 官方机器人 SDK
License: GNU General Public License v3.0
适用于 Kotlin/Java 的 QQ 官方机器人 SDK
License: GNU General Public License v3.0
如何使用,有没有demo
描述
简单对功能请求进行描述
添加私聊消息事件的监听
详细
详细说明功能需求 用途 为什么需要
DIRECT_MESSAGE (1 << 12)
- DIRECT_MESSAGE_CREATE // 当收到用户发给机器人的私信消息时
补充说明
添加你对此功能请求的补充说明
描述
简单对功能请求进行描述
添加消息审核结果事件的监听
详细
详细说明功能需求 用途 为什么需要
MESSAGE_AUDIT (1 << 27)
- MESSAGE_AUDIT_PASS // 消息审核通过
- MESSAGE_AUDIT_REJECT // 消息审核不通过
补充说明
添加你对此功能请求的补充说明
描述
简单对功能请求进行描述
添加音频事件监听实现
详细
详细说明功能需求 用途 为什么需要
AUDIO_ACTION (1 << 29)
- AUDIO_START // 音频开始播放时
- AUDIO_FINISH // 音频播放结束时
- AUDIO_ON_MIC // 上麦时
- AUDIO_OFF_MIC // 下麦时
补充说明
添加你对此功能请求的补充说明
描述
简单对功能请求进行描述
适配由腾讯官方提供的 QQ 机器人平台
详细
详细说明功能需求 用途 为什么需要
通过官方文档等,编写相应API 事件
补充说明
添加你对此功能请求的补充说明
请问能不能引用回复消息
WSSClient 类中连接 wss 部分我看是直接 new WebSocketClient(uri) 的方式进行一个对象的创建和重写,是否可以通过继承 WebSocketClient 类的方式来使代码结构更好呢,毕竟 WebSocketClient 本身是一个抽象类。拿 Java-WebSocket 的一个例子作为参考:
public class ExampleClient extends WebSocketClient {
public ExampleClient(URI serverUri, Draft draft) {
super(serverUri, draft);
}
public ExampleClient(URI serverURI) {
super(serverURI);
}
public ExampleClient(URI serverUri, Map<String, String> httpHeaders) {
super(serverUri, httpHeaders);
}
@Override
public void onOpen(ServerHandshake handshakedata) {
send("Hello, it is me. Mario :)");
System.out.println("opened connection");
// if you plan to refuse connection based on ip or httpfields overload: onWebsocketHandshakeReceivedAsClient
}
@Override
public void onMessage(String message) {
System.out.println("received: " + message);
}
@Override
public void onClose(int code, String reason, boolean remote) {
// The close codes are documented in class org.java_websocket.framing.CloseFrame
System.out.println(
"Connection closed by " + (remote ? "remote peer" : "us") + " Code: " + code + " Reason: "
+ reason);
}
@Override
public void onError(Exception ex) {
ex.printStackTrace();
// if the error is fatal then onClose will be called additionally
}
public static void main(String[] args) throws URISyntaxException {
ExampleClient c = new ExampleClient(new URI(
"ws://localhost:8887")); // more about drafts here: http://github.com/TooTallNate/Java-WebSocket/wiki/Drafts
c.connect();
}
}
最后:基本的框架已经搭起来了,作者大大没必要这么赶~ 😂
描述
简单对功能请求进行描述
添加对话题子频道事件的支持
详细
详细说明功能需求 用途 为什么需要
FORUM_EVENT (1 << 28)
- THREAD_CREATE // 当用户创建主题时
- THREAD_UPDATE // 当用户更新主题时
- THREAD_DELETE // 当用户删除主题时
- POST_CREATE // 当用户创建帖子时
- POST_DELETE // 当用户删除帖子时
- REPLY_CREATE // 当用户回复评论时
- REPLY_DELETE // 当用户回复评论时
补充说明
添加你对此功能请求的补充说明
请教一下,本地图片如何发送。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.