Coder Social home page Coder Social logo

karakoo / cai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cscs181/cai

0.0 0.0 0.0 945 KB

🤖 又一个 QQ 协议支持库,使用 Python 编写 Yet Another Bot Framework for Tencent QQ Written in Python

Home Page: https://cai-bot.readthedocs.io/

License: GNU Affero General Public License v3.0

Python 100.00%

cai's Introduction

CAI

✨ Yet Another Bot Framework for Tencent QQ Written in Python ✨

license python QQ Chat


声明

一切开发旨在学习,请勿用于非法用途

  • CAI 是完全免费且开放源代码的软件,仅供学习和娱乐用途使用
  • CAI 不会通过任何方式强制收取费用,或对使用者提出物质条件

许可证

CAI 采用 AGPLv3 协议开源,不鼓励、不支持一切商业使用。


特色

  • 简单易用的 API,支持多账号

  • 极少的额外依赖

  • 异步编写,效率++

  • 完整的 Type Hints

    • Packet Query 支持 Variadic Generics

      from cai.utils.binary import Packet
      packet = Packet(bytes.fromhex("01000233000000"))
      packet.start().int8().uint16().bytes(4).execute()
      # return type: INT8, UINT16, BYTES
    • 便携的 JceStruct 定义 (使用方法参考 JceStruct)

      from typing import Optional
      from jce import JceStruct, JceField, types
      
      class CustomStruct(JceStruct):
          int32_field: types.INT32 = JceField(jce_id=0)
          optional_field: Optional[types.DOUBLE] = JceField(None, jce_id=1)
          nested_field: OtherStruct = JceField(jce_id=2)

功能

CAI 仅作为底层协议库使用,将协议封装为 API。

CAI 不会支持涉及 金钱主动邀请获取凭证 等敏感操作的协议。

已支持的协议列表:

登录

cai.api.login API Reference

  • 账号密码登录
  • 设备锁验证
  • 图片验证码提交
  • 短信验证码提交
  • 扫码登录

客户端

cai.api.client API Reference

  • 设置在线状态

好友

cai.api.friend API Reference

  • 获取好友列表
  • 获取好友信息
  • 获取好友分组列表
  • 获取好友分组信息

群组

cai.api.group API Reference

  • 获取群列表
  • 获取群信息
  • 获取群成员列表

事件

cai.api.flow API Reference

通过注册事件监听回调,在事件发生时执行指定操作。事件类型可通过 cai.client 模块导入。

文档

In Development

See on Read The Docs

cai's People

Contributors

starhearthunt avatar yanyongyu 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.