Coder Social home page Coder Social logo

qqbot-1's Introduction

QQBot

基于 Smart QQ(Web QQ)的 QQ 机器人

Java 版本:ScienJus/smartqq

Api分析:

Web QQ协议分析(一):前言

Web QQ协议分析(二):登录

Web QQ协议分析(三):收发消息

Web QQ协议分析(四):好友相关

Web QQ协议分析(五):群和讨论组相关

Web QQ协议分析(六):其他

使用方法

安装这个 Gem :

gem install qqbot

require 'qqbot'并编写自己的业务逻辑,例如:

require 'qqbot'

qqbot = QQBot.new

# 在这里需要扫描二维码登录

# 打印出好友列表
qqbot.get_friend_list_with_category.each do |category|
  puts category.name
  category.friends.each do |friend|
    puts "———— #{friend.nickname}"
  end
end

示例代码

在控制台打印接收到的所有消息

效果:

Console

通过 Tuling123 的 Api 实现自动回复功能

效果:

Tuling

Api 列表

  • 登录
  • 拉取消息
  • 获取群列表
  • 获取好友列表
  • 获取讨论组列表
  • 发送私聊消息
  • 发送群消息
  • 发送讨论组消息
  • 发送临时消息
  • 好友详细信息
  • 群详细信息
  • 讨论组详细信息
  • 获取在线好友
  • 获取最近会话
  • 获取登录用户信息
  • 查询用户 QQ 号
  • 退出登录

拓展功能列表

  • 登录时保存二维码到本地
  • 登录时通过网页查看二维码
  • 登录时发送二维码到指定邮箱
  • 登录时将二维码打印到控制台
  • 掉线时尝试重新登录
  • 登录失效后邮件推送信息

反馈

有问题或是建议可以提 Issues ,或是发邮件联系我,我的邮箱:[email protected]

qqbot-1's People

Contributors

scienjus avatar

Watchers

Mikoyan avatar  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.