Skip to main content
Sora.Command package icon

Sora.Command

v2.0.2Latest StableUnlisted
net10.0

Sora 机器人框架 - 属性指令路由

Published
Jan 1, 1900
128y ago
Total Downloads
0
0

Deprecated Package Version

Reason: Legacy

Install

dotnet add package Sora.Command --version 2.0.2
ProductVersions
.NET
net10.0

README

Sora

一个基于 C#/.NET 10 的多协议异步机器人开发框架

NuGet License

特性

  • 多协议支持:Milky(主要)/ OneBot v11(兼容)
  • 模块化架构,按需引用
  • 属性指令路由([CommandGroup] + [Command])
  • 完整的事件分发与消息等待机制
  • 简单直接的 API 设计

安装

dotnet add package Sora
dotnet add package Sora.Adapter.Milky    # Milky 协议
dotnet add package Sora.Adapter.OneBot11 # 或 OneBot v11 协议

快速开始

using Sora;
using Sora.Adapter.Milky;

SoraService service = SoraServiceFactory.Instance.CreateMilkyService(
    new MilkyConfig
        {
            Host        = "localhost",
            Port        = 3010,
            AccessToken = "your-token"
        });

service.Events.OnMessageReceived += async e =>
{
    if (e.Message.Body.GetText() == "ping")
        await e.Api.SendGroupMessageAsync(e.Message.GroupId, new MessageBody("pong"));
};

await service.StartAsync();
await Task.Delay(-1);

项目模块

包 说明
Sora 框架应用层
Sora.Entities 共享实体 — 事件、消息段、API 接口
Sora.Core 核心工具库
Sora.Command 属性指令路由
Sora.Adapter.Milky Milky 协议适配器
Sora.Adapter.OneBot11 OneBot v11 协议适配器

文档与链接

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

NuGet marks this package as deprecated. Review the publisher's migration guidance before adopting it.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.This version is unlisted. Prefer a listed release unless you deliberately need this exact version for reproducibility.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.