rf-tar-railt / cesloi Goto Github PK
View Code? Open in Web Editor NEW一个简易,基于 mirai-api-http v2 的Python SDK
License: GNU Affero General Public License v3.0
一个简易,基于 mirai-api-http v2 的Python SDK
License: GNU Affero General Public License v3.0
当函数不要求获取messageChain时command_handle是收不到事件可能传递的message的
或考虑在将事件参数传递给函数前先经过command_handle
Cesloi 的事件系统是用的”发布--订阅“模型
在C#中,事件在类中声明且生成,且通过使用同一个类或其他类中的委托与事件处理程序关联。包含事件的类用于发布事件。这被称为 发布器(publisher) 类。其他接受该事件的类被称为 订阅器(subscriber) 类。事件使用 发布-订阅(publisher-subscriber) 模型。此处的委托(delegate)相当于一类拥有相同参数类型与返回值类型的方法的统称。
发布器(publisher) 是一个包含事件和委托定义的对象。事件和委托之间的联系也定义在这个对象中。发布器(publisher)类的对象调用这个事件,并通知其他的对象。
订阅器(subscriber) 是一个接受事件并提供事件处理程序的对象。在发布器(publisher)类中的委托调用订阅器(subscriber)类中的方法(事件处理程序)。一个事件可以处理多个经过委托注册的订阅器类中的方法。
对应此处的Cesloi的delegatesystem,Publisher类包含订阅器列表 (Subscriber List) 与绑定事件类型 (Bind Event), 而委托则扩大为EventDelegate,用来处理所有的订阅器类中的事件处理程序(Callable Function)。
如果可行,那么是否可以将委托的概念缩小,塞入发布器类中?
通信模块收到来自api的事件消息,根据类型传递给相应发布器中的委托进行数据分析,再由委托将分析好的参数值传递给订阅器中的处理程序
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.