QQChannelBot 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package QQChannelBot --version 1.0.0
                    
NuGet\Install-Package QQChannelBot -Version 1.0.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="QQChannelBot" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="QQChannelBot" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="QQChannelBot" />
                    
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 QQChannelBot --version 1.0.0
                    
#r "nuget: QQChannelBot, 1.0.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.
#addin nuget:?package=QQChannelBot&version=1.0.0
                    
Install QQChannelBot as a Cake Addin
#tool nuget:?package=QQChannelBot&version=1.0.0
                    
Install QQChannelBot as a Cake Tool

#QQ机器人框架 使用.NET6技术封装的QQ机器人通信框架

##使用说明

1.配置日志输出等级

Log.LogLevel = LogLevel.Debug;

2.创建机器人, 配置参数请查阅 QQ机器管理后台

ChannelBot bot = new(new()
{
    BotAppId = 开发者ID,
    BotToken = 机器人令牌,
    BotSecret = 机器人密钥
});

3.注册自定义消息命令

// 注册自定义命令,这里让机器人复读用户的消息
// 如:用户发送 @机器人 复读 123
//   机器人将回复 123
bot.AddCommand("复读", async (sender, e, msg) =>
{
    await sender.SendMessageAsync(e.ChannelId, new MsgNormal(e.Id)
    {
        Content = msg
    }.Body);
});

4.如何接收 @机器人 消息

// 订阅 OnAtMessage 事件,处理所有收到的 @机器人 消息
// 注1:被 AddCommand 命令匹配的消息不会出现在这里
// 注2:若要接收服务器推送的所有消息,请订阅 OnDispatch 事件
// sender是ChannelBot对象,e是Message对象,type是消息类型(暂无用,后面可能删除)
bot.OnAtMessage += async (sender, e, type) =>
{
};

5.启动机器人(开始运行并监听频道消息)

bot.Start();
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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.6.2 616 3/4/2022
1.6.1 447 2/19/2022
1.6.0 457 1/30/2022
1.5.4 491 1/22/2022
1.5.3 447 1/21/2022
1.5.2 482 1/20/2022
1.5.1 493 1/18/2022
1.5.0 494 1/18/2022
1.4.2 462 1/16/2022
1.4.1 488 1/14/2022
1.4.0 448 1/13/2022
1.3.9 457 1/12/2022
1.3.8 465 1/11/2022
1.3.7 304 1/10/2022
1.3.6 325 1/10/2022
1.3.5 282 1/9/2022
1.3.4 276 1/8/2022
1.3.3 282 1/6/2022
1.3.2 299 1/4/2022
1.3.1 287 1/3/2022
1.3.0 309 1/2/2022
1.2.9 280 1/2/2022
1.2.8 286 1/1/2022
1.2.7 302 12/31/2021
1.2.6 284 12/30/2021
1.2.5 280 12/30/2021
1.2.4 286 12/30/2021
1.2.3 256 12/29/2021
1.2.2 282 12/28/2021
1.2.1 279 12/28/2021
1.2.0 287 12/27/2021
1.1.3 275 12/26/2021
1.1.2 297 12/26/2021
1.1.1 282 12/26/2021
1.1.0 295 12/24/2021
1.0.9 334 12/24/2021
1.0.8 270 12/23/2021
1.0.7 285 12/23/2021
1.0.6 276 12/23/2021
1.0.5 286 12/23/2021
1.0.4 280 12/22/2021
1.0.3 299 12/22/2021
1.0.2 296 12/21/2021
1.0.1 295 12/20/2021
1.0.0 264 12/20/2021