Coder Social home page Coder Social logo

qqrobot-4's Introduction

使用

暂时只考虑支持 Python3

$ pip install -r requirements.txt
$ python cli.py

扩展

暂时性提供的简单扩展方式:

from qqrobot import bot, run

# 注册特定消息字段

# 注册消息,函数返回值即为回复
@bot.register_msg("这里是收到的消息内容")
def hello(msg):
    return "返回值即为回复"

# 如,对别人发过来的 hello 要回复 hello world,可以这么做
@bot.register_msg('hello')
def reply(msg):
    return "hello world"


# 拦截所有消息

@bot.register_msg("ALL")
def reply_all(msg):
    """接收到的所有消息将会加上 ALL 回复给发送者,
    单独注册的消息不受影响
    """
    return msg + "ALL"

# 运行
run()

TODO

  • 正则匹配消息
  • 处理群消息,讨论组消息
  • 获取联系人列表,QQ号,QQ群号回复,发送

Features

  • 自动回复
  • 收集消息

qqrobot-4's People

Contributors

dependabot[bot] avatar x1ah avatar xhades 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.