Update README.md
This commit is contained in:
parent
3e9c25b72c
commit
af6e22f803
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ The API is well documented with XML documentation, meaning hovering over a metho
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
|
using System.Console;
|
||||||
using CollabVMSharp;
|
using CollabVMSharp;
|
||||||
// Instantiate the client
|
// Instantiate the client
|
||||||
var cvm = new CollabVMClient("wss://computernewb.com/collab-vm/vm0", "cvmsharptest", "vm0b0t");
|
var cvm = new CollabVMClient("wss://computernewb.com/collab-vm/vm0", "cvmsharptest", "vm0b0t");
|
||||||
|
@ -22,7 +23,7 @@ await cvm.TypeString("hey sexies");
|
||||||
// Login as an admin or mod
|
// Login as an admin or mod
|
||||||
await cvm.Login("hunter2");
|
await cvm.Login("hunter2");
|
||||||
// Run a command in the QEMU monitor and get a response
|
// Run a command in the QEMU monitor and get a response
|
||||||
await cvm.QEMUMonitor("info block");
|
Console.WriteLine(await cvm.QEMUMonitor("info block"));
|
||||||
// Send a message when someone takes a turn
|
// Send a message when someone takes a turn
|
||||||
cvm.TurnUpdate += async (_, e) => {
|
cvm.TurnUpdate += async (_, e) => {
|
||||||
await cvm.SendChat($"You have the turn, {e.Queue[0].Username}!");
|
await cvm.SendChat($"You have the turn, {e.Queue[0].Username}!");
|
||||||
|
|
Loading…
Reference in a new issue