A WeChatFerry Client SDK based on .NET, and you can use it to make a WeChat robot simply.
Install specified version of WeChat. The supported WeChat version depends on the WCF version. Currently, the default version is 3.9.12.17. For other WCF versions, you can download them yourself and specify them through WCFClientOptions
.
dotnet add package WeChatFerry.Net
using WeChatFerry.Net;
using var client = new WCFClient();
client.OnRecvMsg += (s, e) => Console.WriteLine($"[{e.Type}] {e.Sender}:{e.Content}");
if (!await client.Start())
{
Console.WriteLine("Failed to start the robot.");
return;
}
client.SendTxt("filehelper", "Hello, World!");
var selfWxid = await client.RPCGetSelfWxidAsync();
Console.WriteLine($"Self wxid: {selfWxid}");
Console.ReadLine();
This project is only for learning and communication, and it is strictly prohibited to use it for commercial purposes. If you have any questions, please contact me to delete it.