1+ <div align =" center " >
2+
13# Edoves
2- A new abstract framework based on Cesloi
34
4- ## Example
5+ > _ las su dres rin romilu, nann sune ri edar neru._
6+
7+ </div >
8+
9+ ## 简介
10+ [ ![ Licence] ( https://img.shields.io/github/license/ArcletProject/Edoves )] ( https://github.com/ArcletProject/Edoves/blob/main/LICENSE )
11+ [ ![ PyPI] ( https://img.shields.io/pypi/v/arclet-edoves )] ( https://pypi.org/project/arclet-edoves )
12+ [ ![ PyPI - Python Version] ( https://img.shields.io/pypi/pyversions/arclet-edoves )] ( https://www.python.org/ )
13+
14+ Edoves 是 ` Arclet Project ` 基于同项目下的 ` Cesloi ` 的 ** 第二代** 框架实现,
15+
16+ ** 该框架目前处于快速迭代状态, API 可能会发生 _ 剧烈_ 变化, 可能还不适合进行生产性的开发与运维**
17+
18+ ## 特性
19+ + 主要部分
20+ - [x] ` InteractiveObject ` : 对` Unity3d ` 中` GameObject ` 的简易模仿
21+ - [ x] ` Monomer ` : 代表逻辑关系的IO
22+ - [ x] ` Module ` : 负责处理事件的IO
23+ - [ x] ` ServerDocker ` : 负责网络会话交互
24+ - [ x] ` Commander ` : 基于 ` Arclet Alconna ` 的指令触发系统
25+ - [x] ` Component ` : IO的主要属性, 负责实际的数据管理与事件响应
26+ - [x] ` Medium ` : 传输事件信息的载体
27+ - [x] ` Protocol ` : 调度` Medium ` 与` IO `
28+ - [x] ` Scene ` : 对IO统一的生命周期管理
29+
30+ + 实现支持
31+ - [x] ` Edoves for mirai-api-http ` : 对 [ ` mirai-api-http ` ] ( https://github.com/project-mirai/mirai-api-http ) 的支持.
32+ - [ ] ` Edoves for OneBot ` : 对 [ ` OneBot ` ] ( https://github.com/botuniverse/onebot ) 的协议实现.
33+ - [ ] ` Edoves for go-cqhttp ` : 对 [ ` go-cqhttp ` ] ( https://github.com/Mrs4s/go-cqhttp ) 的扩展 API 支持.
34+
35+ ## 样例
536
637main.py:
738``` python
8- from arclet.edoves.builtin.mah.messages import Source
39+ from arclet.edoves.builtin.mah.actions import Reply
940from arclet.edoves.builtin.mah.module import MessageModule
10- from arclet.edoves.builtin.commander import Commander
1141from arclet.edoves.builtin.medium import Message
1242from arclet.edoves.builtin.event.message import AllMessage
13- from arclet.edoves.main import Edoves, Monomer
1443from arclet.edoves.builtin.client import AioHttpClient
44+ from arclet.edoves.main import Edoves
45+
46+
47+ async def test_message_reaction (message : Message):
48+ if message.content.startswith(" Hello World" ):
49+ await Reply(message).execute()
50+ await message.set(" I received 'Hello World'!" ).send()
51+
1552
1653app = Edoves(
1754 debug = False ,
@@ -23,26 +60,6 @@ app = Edoves(
2360 }
2461)
2562message_module = app.scene.activate_module(MessageModule)
26- commander = app.scene.activate_module(Commander)
27-
28-
29- @commander.command (" print <content:str>" )
30- async def _ (content : str , message : Message, sender : Monomer, bot : Edoves):
31- await message.set(" This is commander test" ).send()
32- await message.set(f " I received content: { content} from { sender.metadata.name} " ).send()
33- if content == " all_group" :
34- await message.set(f " { [k.metadata.name for k in bot.self.filter_parents(' Group' )]} " ).send()
35- if content == " friend" :
36- await message.set(f " { [k.metadata.name for k in bot.self.filter_children(' Friend' )]} " ).send()
37-
38-
39- async def test_message_reaction (message : Message):
40- if message.content.startswith(" Hello" ):
41- await message.purveyor.action(" send_with" )(
42- message, reply = True , quote = message.content.find(Source).id, type = message.type)
43- await message.set(" I received 'Hello World!'" ).send()
44-
45-
4663message_module.new_handler(AllMessage, test_message_reaction)
4764app.run()
4865```
@@ -61,3 +78,20 @@ class MessageModule(BaseModule):
6178
6279
6380```
81+
82+ ## 相关项目
83+
84+ > 这些项目都非常优秀, 我相信你听说过他们
85+
86+ + [ ` Graia Framework ` ] ( https://github.com/GraiaProject )
87+ - [ ` Avilla ` ] ( https://github.com/GraiaProject/Avilla ) : ` Graia Project ` 的 "下一代" 框架实现
88+ - [ ` Ariadne ` ] ( https://github.com/GraiaProject/Ariadne ) : 继承了 ` Graia Project ` 中 ` Application ` 并进行了许多改进后产生的作品
89+ + [ ` Mamoe Technologies ` ] ( https://github.com/mamoe ) :
90+ - [ ` mirai ` ] ( https://github.com/mamoe/mirai )
91+ - [ ` mirai-api-http ` ] ( https://github.com/project-mirai/mirai-api-http )
92+
93+ ## 开源协议
94+
95+ Edoves 及其拓展 使用 MIT 作为开源协议.
96+
97+ 但如果你若引用到了使用具有传染性开源协议(如 GPL/AGPL/LGPL 等)的项目, 请遵循相关规则.
0 commit comments