GithubHelp home page GithubHelp logo

hairyrabbit / oicq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from takayama-lily/oicq

0.0 1.0 0.0 1.79 MB

Node.js实现的QQ安卓协议/机器人

License: Mozilla Public License 2.0

JavaScript 100.00%

oicq's Introduction

oicq

npm version node engine

  • QQ(安卓)协议基于Node.js的实现。也参考了一些其他开源仓库如miraimiraiGo等。
  • 使用 酷Q/CQHTTP 风格的API,原生支持经典CQ码。
  • 实现了大部分常用协议和功能,但不会支持金钱/红包相关协议。
  • 请使用 Node.js 12.16 以上版本。

Install:

> npm init    # or > yarn init
> npm i oicq  # or > yarn add oicq

Usage:

const { createClient } = require("oicq");
const uin = 123456789; // your account
const client = createClient(uin);

//监听上线事件
client.on("system.online", () => console.log("Logged in!"));

//监听消息并回复
client.on("message", (data) => data.reply("hello world"));

//监听滑动验证码事件并输入ticket
client.on("system.login.slider", function () {
  process.stdin.once("data", (input) => {
    this.sliderLogin(input);
  });
});

client.login("password"); // your password or password_md5

更详细的例子可以参考 demo.js
API简洁友好,熟悉Nodejs者可直接引入依赖进行开发。
如果你不知道要如何组织代码,可参考或使用 abot 以插件形式编写功能。

相关文档:

滑动验证码ticket教程
API参考文档
事件参考文档
常见问题
wiki列表

其他:

JavaScript语言基础
Node.js入门教程
5分钟上手TypeScript
Gitter

oicq's People

Contributors

takayama-lily avatar cloud370 avatar

Watchers

James Cloos 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.