Git Product home page Git Product logo

oicq's Introduction

OICQ

npm version node engine ← 注意版本

  • QQ(安卓)协议的nodejs实现。也参考了一些其他开源仓库如mirai、miraiGo等。
  • 以高效和稳定为第一目的,在此基础上不断完善功能。
  • 将会逐步支持手机协议的大部分功能。
  • 使用 CQHTTP 风格的API、事件和参数(少量差异),并且原生支持经典的CQ码。
  • 本项目使用AGPL-3.0许可证,旨在学习。不推荐也不提供商业化使用的支持。
  • 有bug请告诉我!

API简洁友好,开箱即用,推荐直接引入依赖进行开发。

# npm i oicq
const oicq = require("oicq");
const uin = 123456789;
const bot = oicq.createClient(uin);

bot.on("system.login.captcha", ()=>{
  process.stdin.once("data", input=>{
    bot.captchaLogin(input);
  });
});

bot.on("message", data=>console.log(data));
bot.on("request", data=>console.log(data));
bot.on("notice", data=>console.log(data));

const password_md5 = "202cb962ac59075b964b07152d234b70";
bot.login(password_md5);

如果需要跨进程的通信,可以使用:

http-api

使用内置的控制台进行调试:

# npm i
# npm test

文档:

功能实现程度
API
事件

oicq's People

Contributors

takayama-lily avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.