28 lines
No EOL
796 B
Markdown
28 lines
No EOL
796 B
Markdown
# pianoverse.net protodef's and client
|
|
This contains the protocol definitions for pianoverse.net. Reversed from using protobuf_inspector on the packets sent through server and client.
|
|
|
|
## Requirements
|
|
1. [Bun](https://bun.sh/docs/installation)
|
|
|
|
## Contact
|
|
Please contact me on Discord @fucksophie. I'm in the pianoverse discord. You can also find me [elsewhere](https://sad.ovh).
|
|
|
|
## Example
|
|
The general API is styled after MPP clients, which Pianoverse has quite a lot of similarities with.
|
|
|
|
```ts
|
|
import { Client } from "pianoverse"
|
|
|
|
const client = new Client("https://pianoverse.net");
|
|
|
|
client.on("open", () => {
|
|
client.setRoom("Lobby")
|
|
client.setProfile("My Bot!")
|
|
})
|
|
|
|
client.on("message", (user, content) => {
|
|
if(content == "!help") {
|
|
client.message("Hi :P")
|
|
}
|
|
})
|
|
``` |