Sora 2.0.1

Suggested Alternatives

HoshikawaKaguya.Sora

Additional Details

这个包不再会维护,建议换包喵

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Sora --version 2.0.1
                    
NuGet\Install-Package Sora -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sora" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sora" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Sora" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sora --version 2.0.1
                    
#r "nuget: Sora, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sora@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sora&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Sora&version=2.0.1
                    
Install as a Cake Tool

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 协议适配器

文档与链接

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Sora:

Package Downloads
OneBot-CommandRoute

使用 Sora 作 OneBot 客户端,Microsoft.Extensions.DependencyInjection 作 IOC 框架的 OneBot 指令路由系统。

PrismBot.SDK

PrismBot's SDK

PluginCore.SoraPlugin

PluginCore 插件: QQ基础插件

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Sora:

Repository Stars
yiyungent/KnifeHub
🧰 简单易用的效率工具平台
MuJint/QQ-RoBot
一个使用c#编写,基于onebot标准的QQ机器人
Version Downloads Last Updated
Loading failed