UNPKG

teeworlds

Version:

Library for (ingame) teeworlds bots.

33 lines (32 loc) 1.43 kB
import { SnapshotItemTypes } from "../enums_types/types"; import { Client } from "../client"; export declare class Game { private _client; _ping_resolve: (_time: number) => void; constructor(_client: Client); private send; Say(message: string, team?: boolean): void; /** Set the team of an bot. (-1 spectator team, 0 team red/normal team, 1 team blue) */ SetTeam(team: number): void; /** Spectate an player, taking their id as parameter. pretty useless */ SpectatorMode(SpectatorID: number): void; /** Change the player info */ ChangePlayerInfo(playerInfo: SnapshotItemTypes.ClientInfo): void; /** Kill */ Kill(): void; /** Send emote */ Emote(emote: number): void; /** Vote for an already running vote (true = f3 / false = f4) */ Vote(vote: boolean): void; private CallVote; /** Call a vote for an server option (for example ddnet maps) */ CallVoteOption(Value: string, Reason: string): void; /** Call a vote to kick a player. Requires the player id */ CallVoteKick(PlayerID: string | number, Reason: string): void; /** Call a vote to set a player in spectator mode. Requires the player id */ CallVoteSpectate(PlayerID: string | number, Reason: string): void; /** probably some verification of using ddnet client. */ IsDDNetLegacy(): void; /** returns the ping in ms (as a promise) */ Ping(): Promise<number>; }