WWebJS.NET
0.1.4
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package WWebJS.NET --version 0.1.4
NuGet\Install-Package WWebJS.NET -Version 0.1.4
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="WWebJS.NET" Version="0.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WWebJS.NET" Version="0.1.4" />
<PackageReference Include="WWebJS.NET" />
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 WWebJS.NET --version 0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WWebJS.NET, 0.1.4"
#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 WWebJS.NET@0.1.4
#: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=WWebJS.NET&version=0.1.4
#tool nuget:?package=WWebJS.NET&version=0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WWebJS.NET
A thin wrapper around whatsapp-web.js that uses Protocol Buffers RPC over named pipes. It aims to expose a similar API using C#.
Example
//start the node server
var workerStartInfo = new WWebJSWorkerStartInfo(("x64/node.exe"), @"/wwebjs-dotnet-server/");
var worker = new WWebJSWorker(workerStartInfo));
await worker.Start();
//configure
await worker.Proxy.SetOptionsAsync(new WWebJSServiceOptions()
{
ChromeExecutablePath = "path/to/chrome.exe",
HeadlessChromeMode = false,
UserDataDir = @"/myAppData/sessions/",//root sessions data directory
Verbose=true,
});
//create a Client
var stream = worker.Proxy.InitClient(new InitClientRequest()
{
ClientCreationOptions = new ClientCreationOptions
{
SessionFolder = "foo" //Local auth directory: /myAppData/sessions/foo
}
});
//Handling Client events
while (await stream.ResponseStream.MoveNext(CancellationToken.None))
{
var current=stream.ResponseStream.Current;
switch (current.EventType)
{
case ClientEventType.Ready:
Console.WriteLine($"Client Ready'");
break;
case ClientEventType.MessageReceived:
if (current.DataJson["body"] == '!ping')
{
var result = await worker.Proxy.SendMessageAsync(new SendMessageRequest()
{
ChatId = current.DataJson["from"],
ClientHandle = "foo",
Content = new MessageContent() { Text="pong"},
});
Console.WriteLine($"Message sent: ${result}")
}
break;
case ClientEventType.MessageCreate:
break;
case ClientEventType.QrReceived:
Console.WriteLine($"Qr: {current.DataJson}'");
break;
case ClientEventType.LoadingScreen:
Console.WriteLine($"Loading Screen");
break;
case ClientEventType.Disconnected:
Console.WriteLine($"Client Disconnected");
default:
break;
}
}
| Product | Versions 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. 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. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.2
- Grpc.Net.Client (>= 2.62.0)
- GrpcDotNetNamedPipes (>= 3.0.0)
- System.Net.Http (>= 4.3.4)
-
net6.0
- Grpc.Net.Client (>= 2.62.0)
- GrpcDotNetNamedPipes (>= 3.0.0)
- System.Net.Http (>= 4.3.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.