takayama-lily / oicq Goto Github PK
View Code? Open in Web Editor NEWTencent QQ Bot Library for Node.js
Home Page: https://oicqjs.github.io/oicq/
License: Mozilla Public License 2.0
Tencent QQ Bot Library for Node.js
Home Page: https://oicqjs.github.io/oicq/
License: Mozilla Public License 2.0
后面会实现“获取QQ相关域名cookies”的功能吗
https://choosealicense.com/licenses/agpl-3.0/
GPL-3.0 的最显著特点是【衍生作品需使用同协议开源】,AGPL-3.0 相比 GPL-3.0 主要的区别是【通过网络的使用属于传播】,两者都不限制商用,因此 README 中的表达有误。
如果希望禁止商用,建议作者通过附加条款的方式加以限制。
关于客户端发消息分片或是长消息,目前的分界并不是很明确,需要重新分析协议。
我对协议实现部分比较感兴趣,可以沟通交流下吗
场景:有时需要转发别人发的视频和图片消息
发现有部分消息显示[视频]你的QQ暂不支持查看视频短片,请升级到最新版本后查看。
使用的是demo代码
node index.js
OICQ程序启动。当前内核版本:v1.10.3
[2020-11-08T23:32:53.171] [INFO] [BOT:xxxxx] - connecting to msfwifi.3g.qq.com:8080
[2020-11-08T23:32:53.219] [INFO] [BOT:xxxxx] - 61.181.203.13:8080 connected
[2020-11-08T23:32:53.503] [ERROR] [BOT:xxxxx] - [温馨提示]当前版本过低,请先升级到手机QQ最新版本。
[禁止登录]当前上网环境异常,
请更换网络环境或在常用设备上登录或稍后再试。
TypeError: Cannot read property 'readInt32BE' of null
// lib/core.js
function parseIncomingPacket(packet) {
const stream = Readable.from(packet, { objectMode: false });
console.log(packet);
console.log(stream.read(4)); // null
const flag1 = stream.read(4).readInt32BE();
}
如题
之前cq-http是支持的
ECONNRESET
在挂机中,出现超时信息具体原因不明。
运行命令为nohup node main.js qq号 &
之前一直是正常的,而且更新版本后主动退群 member 返回 undefined
troop发包协议那段的格式是逆向出来的吗?
不再使用传统.proto定义字段的方式。
改为使用pb手动组包/解包的方式。
(可能需要换掉protobufjs)
运行中,正常运行2天,突然就消息接受不到,网络稳定。无报错,无警告,重启解决。
请各位谨慎使用
如题,尝试自己看了一下问题好像出现在 lib/message/builder.js 里面:
async function audioTrans(cache_filepath, file) {
let filepath, tmp;
if (typeof file === "string") {
filepath = file;
file = await readFile(filepath, 0xfffffff); // 这里
} else {
tmp = Math.random() + "" + Date.now();
// ...
改成这样之后就可以上传发送了:
async function audioTrans(cache_filepath, file) {
let filepath, tmp;
if (typeof file === "string") {
filepath = file;
file = await fs.promises.readFile(filepath); // 这里
} else {
tmp = Math.random() + "" + Date.now();
// ...
但是不知道会不会有什么影响,还请大佬检查一下代码吧。
不知道有没有热重载这个功能 希望以后能添加
如题,我想在回复某人消息时触发 bot 并通过查询数据库已缓存的聊天记录获取到我回复的那条消息的内容,但是题目中的问题导致该操作无法实现。
看起来与此问题类似 Mrs4s/go-cqhttp#454
如题
原先使用cqhttp时有提供发送base64的功能,oicq上仅支持file和url的发送方式,不太会写js,要是写得出来大概会pr吧(?)
notice.friend.poke 好友测试没效果
群聊测试戳一戳也没效果
const { createClient } = require("oicq");
const uin = ; // your account
const bot = createClient(uin);
const password = ""; // your password or password_md5
bot.login(password);
bot.on("system.login.captcha", () => {
process.stdin.once("data", input => {
bot.captchaLogin(input);
});
});
bot.on("message", data => {
console.log(data);
if (data.group_id > 0)
bot.sendGroupMsg(data.group_id, "hello");
else
bot.sendPrivateMsg(data.user_id, "hello");
});
bot.on("notice", data => {
console.log(data);
});
go-cqhttp已经有mac协议支持了,可能比pad,安卓更加完美,能否把设备信息做成配置文件,也方便修改
例如:
xxxx邀请xxxx加入了本群,
xxx与除xxxx外的其他人均不是好友关系,请注意隐私安全。
发送at,手机无法显示@符号,只有群昵称,电脑端正常
作者您好,感谢您做了如此实用简单的bot,这对一个弱类型语言的开发者来说简直就是福音。我使用您的代码结合做一个客户端程序时候,发现登录成功后找不到合适的方法来判断登录的状态?为什么通过getLoginInfo()拿不到正确的登录信息,但实列化client对象属性中的登录状态又是正确的呢?
proto文件:https://github.com/protobufbot/onebot_idl
npx pbjs -t static-module -w commonjs -o proto.js *.proto --force-long
pbts -o proto.d.ts proto.js
[禁止登录]当前上网环境异常,请更换网络环境或在常用设备上登录或稍后再
试 QQ是可以正常登陆的,换个账号也不行
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string, Buffer, or Uint8Array. Received type number
at chunkInvalid (_stream_readable.js:329:12)
at readableAddChunk (_stream_readable.js:261:12)
at Readable.push (_stream_readable.js:224:10)
at next (internal/streams/from.js:34:27)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
求尽快实现set_group_snonymous_ban
即禁言群内匿名人员
接收到的
[CQ:image,file=base64:///9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAeAB4DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6w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mJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3 Pn6/9oADAMBAAIRAxEAPwD3 iiigAooooAKzdf1m38PeH7/AFe6/wBVaQNKRnG4gcKPcnA/GtKuG8c/8TfxH4W8LPxa3t095dZ6SR24DiPHoWK5 lAD9K1j/hDfANhe Kr65m1C6YO6HdLK88pLCGNeTxnaFHA21taB4jbXZJ0bQtZ0zyQrA6jbrGJM5 7hjkjHI4xkVy3xDnXTvG/gHU518y2j1Ca2aIdS8sYVG9PlIJrvvtSfbWtQreYsYkJ7YJI/PigD/9k= 失败,已忽略该图片。
简单看了下似乎是将+转义成了空格导致base64的内容出了问题。
v1.12.3和v1.13.1 都接收不到,群消息正常
好友列表里只有age信息,而且都是0
qq现在送好友生日礼物不是收费的就是要看广告。
希望加个getUserInfo(uin) 的接口
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.