Flandre.Core 0.1.0-alpha

This is a prerelease version of Flandre.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Flandre.Core --version 0.1.0-alpha
NuGet\Install-Package Flandre.Core -Version 0.1.0-alpha
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="Flandre.Core" Version="0.1.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Flandre.Core --version 0.1.0-alpha
#r "nuget: Flandre.Core, 0.1.0-alpha"
#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.
// Install Flandre.Core as a Cake Addin
#addin nuget:?package=Flandre.Core&version=0.1.0-alpha&prerelease

// Install Flandre.Core as a Cake Tool
#tool nuget:?package=Flandre.Core&version=0.1.0-alpha&prerelease

Flandre

.NET 6 实现的跨平台,低耦合的聊天机器人框架
一次编写,多处运行

License Stars Contributors

本项目的名称来源于东方 Project 中的角色芙兰朵露 · 斯卡雷特 (Flandre Scarlet) (番茄炒蛋)


项目仍在早期开发阶段,功能尚未完善,可能带来 API 的非兼容性变更。
如果您对项目的开发感兴趣,诚挚欢迎您的改进建议或 PR 贡献。

Flandre 对聊天平台的结构进行抽象化,采用适配器模式兼容各大聊天平台,同时提供了良好的开发体验。

目前已经实现的适配器:

起步

遵循不知道哪里来的惯例,我们以一个复读小程序开始:

using Flandre.Core;
using Flandre.Adapters.Konata;
using Konata.Core.Common;

var app = new FlandreApp();

var config = new KonataAdapterConfig();
config.Bots.Add(new KonataBotConfig
{
    KeyStore = new BotKeyStore("<QQ 号>", "<密码>")
});

class ExamplePlugin : Plugin
{
    public override void OnMessageReceived(Context ctx)
        => ctx.Bot.SendMessage(ctx.Message);
}

app
    .UseKonataAdapter(config)
    .Use(new ExamplePlugin())
    .Start();

运行程序,向我们 bot 的 QQ 号发送一条消息,bot 会将消息原封不动地发回来。 复读不仅仅是人类的本质.jpg

路线图

  • 基本框架搭建
  • 消息段实现
  • 消息相关工具链
  • 甜甜的语法糖
  • 事件系统
  • 指令系统
  • OneBot 协议适配

致谢

项目编写过程中参考了许多开源项目,没有它们就没有 Flandre 的诞生:

(按字母排序)

License

本项目以 MIT 许可证 开源 (′▽`)╭(′▽`)╯

项目头像来自画师 yasuharasora 的作品(PID 91739274),若有侵权请联系我删除。
The project avatar is from this artwork (PID 91739274) by yasuharasora. Please contact me for deletion if it violates rights.

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

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Flandre.Core:

Package Downloads
Flandre.Framework

现代化、跨平台的聊天机器人框架,一次编写,多处运行。

Flandre.Adapters.Mock

Mock client for Project Flandre.

Flandre.Adapters.Konata

Konata.Core (QQ Protocol) adapter for Flandre project.

Flandre.Adapters.OneBot

OneBot protocol adapter for Flandre project.

Flandre.Core.Reactive

Reactive Extensions (Rx.NET) support for Flandre.Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-rc.4 78 6/15/2023
1.0.0-rc.3 67 6/4/2023
1.0.0-rc.2 86 4/19/2023
1.0.0-rc.1 109 3/12/2023
1.0.0-alpha.4 85 3/4/2023
1.0.0-alpha.3 80 3/2/2023
1.0.0-alpha.2 86 2/26/2023
1.0.0-alpha.1 82 2/24/2023
0.8.0 446 1/9/2023
0.7.0 935 11/29/2022
0.6.0 313 11/27/2022
0.5.0 688 11/5/2022
0.4.0 357 10/15/2022
0.3.0 501 10/7/2022
0.2.0-alpha 162 9/23/2022
0.1.0-alpha 183 9/21/2022