2 Star 1 Fork 0

晨旭 / receiver-meow

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

receiver-meow

All Contributors Build status MIT NLua code-size

能运行lua脚本的接待喵qq机器人,欢迎加入交流群931546484

功能

  • 对接OneBot的http/websocket通讯协议
  • 使用 .Net Core 5 开发,可跨平台
  • 消息处理逻辑,完全由lua实现
  • lua代码动态加载,重载虚拟机后,立即生效
  • Lua层可直接调用C#层接口
  • 自带了http(s) post/get、2D图片处理、数据存储(xml)等接口

下载

正式版:GitHub Releases

快照版:appveyor

默认脚本

自从插件的V2.0.0版本开始,默认脚本仓库与主仓库分离,Lua代码可在此仓库查看:receiver-meow-lua

使用Lua进行开发

与机器人相关的,收发消息与各种事件的处理接口、脚本运行逻辑、各接口调用方法,请参阅develop.md的描述

Task架构介绍

主虚拟机由Task框架调度,具体的任务、定时器用法请见LuaTask项目的Readme

每次收到新的消息上报,便会加到对应名称的Lua虚拟机中来处理,具体分配代码见Events.cs

整个LuaTask管理,由LuaStates.cs控制:

                  LuaStates.cs文件的代码逻辑

           +-----------+                +--------------------+
New message|           | Name not exist |                    |
>>>>>>>>>>>+ lua pool  +--------------->+create new lua state|
           |           |                |                    |
           +----+------+                +-------+----------+-+
                |                               |          |
                |Name Exist                     |          |
                v                               |          |
       +--------+-------------------+           |          |
       | add new task to this state +<----------+          |
       +-------------+--------------+                      |
                     |                                     |
                     |                                     |
       +-------------+-------------+                       |
       |                           |   start run new state |
       |   task framework running  +<----------------------+
       |                           |
       +---------------------------+

食用

先去下载一个支持OneBot的框架,推荐go-cqhttp。配置好qq和密码跑起来

下载接待喵:releases

命令行可添加参数更改连接http、ws的端口,运行后,输入?即可查看帮助

默认脚本可以在群内输入帮助查看自带功能

脚本的功能解释请见Lua脚本项目的Readme

结尾

本项目基于MIT协议

Contributors ✨

Thanks goes to these wonderful people (emoji key):


一般通过吃瓜群众

🚧 💻 🤔

CXM

💻 🐛

morinoyuki

💻 🐛

gy39830

💻 🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Comments ( 0 )

Sign in for post a comment

About

依靠Lua脚本实现功能的酷q机器人插件,基于Native.SDK与酷Q spread retract
C#
Cancel

Releases (1)

All

Contributors

All

Activities

load more
can not load any more
C#
1
https://gitee.com/chenxuuu/receiver-meow.git
git@gitee.com:chenxuuu/receiver-meow.git
chenxuuu
receiver-meow
receiver-meow
master

Search