Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 910 Bytes

File metadata and controls

32 lines (25 loc) · 910 Bytes

Owop.NET

Owop.NET is an asynchronous .NET library for interfacing with OurWorldOfPixels (OWOP). It follows in the footsteps of projects such as OWOP.js and is designed for easily creating OWOP bots.

Example

using Microsoft.Extensions.Logging;
using Owop.Client;

// Create our client instance
using var client = IOwopClient.Create();

// Fires when our client connects to the world
client.Connected += args =>
{
    args.World.Logger.LogInformation($"Connected as ID {args.World.ClientPlayer.Id}");
};

// Fires when another player uses the /tell command on us
client.Tell += async msg =>
{
    await msg.Player.Tell($"Hello from {msg.World.Name}!");
};

// Connect to a world!
// World name defaults to "main" if none is provided
await client.Connect(options: new ConnectionOptions
{
    Nickname = "MyFirstBot"
});