UNPKG

servertap-js

Version:

A TypeScript library for working with the ServerTap API

10 lines (9 loc) 489 B
import { Base } from "../base"; export class Chat extends Base { broadcast(message: string): Promise<string> { return this.request("/chat/broadcast", { method: "POST", body: `message=${message}` }, "application/x-www-form-urlencoded"); } tell(playerUuid: string, message: string): Promise<string> { return this.request("/chat/tell", { method: "POST", body: `playerUuid=${playerUuid}&message=${message}` }, "application/x-www-form-urlencoded"); } }