YHChatSDK.NetCore
1.2.0
dotnet add package YHChatSDK.NetCore --version 1.2.0
NuGet\Install-Package YHChatSDK.NetCore -Version 1.2.0
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="YHChatSDK.NetCore" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YHChatSDK.NetCore" Version="1.2.0" />
<PackageReference Include="YHChatSDK.NetCore" />
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 YHChatSDK.NetCore --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: YHChatSDK.NetCore, 1.2.0"
#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 YHChatSDK.NetCore@1.2.0
#: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=YHChatSDK.NetCore&version=1.2.0
#tool nuget:?package=YHChatSDK.NetCore&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">YHChatSDK.NETCore <h4 align="center">云湖 .NET Core SDK,助力开发者迅速构建功能完备的云湖机器人
❄️ 介绍
云湖 .NET Core SDK,助力开发者迅速构建功能完备的云湖机器人应用。
🐱🏍 链接
文档教程
官方Demo
云湖官网
🎉 实现
事件
- 普通消息事件
- 指令消息事件
- 关注机器人事件
- 取消关注机器人事件
- 消息中按钮点击事件
- 加入群事件
- 退出群事件
- 机器人设置事件
接口
- 发送消息
- 批量发送消息
- 编辑消息
- 撤回消息
- 设置看板
- 取消设置看板
📡 快速开始
1.下载 Nuget 包
使用Nuget包管理器搜索YHChatSDK并下载导入。
2.初始化
public static void Main(string[] args)
{
// 初始化核心服务
YHChatSDKApplication.Initializate("你的机器人token");
// 将接口服务注入到DI容器
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddYHChatEventListener();
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
}
开发插件
根据你的业务需求,实现相对应的事件接口,便可快速响应云湖推送事件。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net8.0
- Serilog (>= 4.2.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Swashbuckle.AspNetCore (>= 6.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.