This repository contains the BotSharp library, a .NET solution for building QQ bots, along with an example project to demonstrate its usage.
- BotSharp: The core class library for interacting with the QQ Bot API. For more details, see the BotSharp README.
- BotSharp.Examples: An example ASP.NET Core project that demonstrates how to use the
BotSharplibrary to create a functional bot. For more details, see the BotSharp.Examples README.
To get started with the example bot:
-
Clone the repository:
git clone https://github.com/your-username/BotSharp.git cd BotSharp -
Configure the example project: Navigate to the
BotSharp.Examplesdirectory and open theappsettings.jsonfile. Fill in your QQ Bot credentials:{ "QQBot": { "AppId": "YOUR_APP_ID", "AppSecret": "YOUR_APP_SECRET", "Token": "YOUR_TOKEN" } } -
Run the example: Navigate to the
BotSharp.Examplesdirectory in your terminal and run the application:cd BotSharp.Examples dotnet run -
Set up your webhook: The bot will start and listen for incoming requests. Configure your QQ Bot platform to send webhook events to your application's endpoint (e.g.,
https://your-public-url/webhook).
Contributions are welcome! Please feel free to open an issue or submit a pull request.