Skip to content

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TribalWars2 API Wrapper

API Wrapper for TribalWars2.com in TypeScript. Missing many types for game packets, but essential components are ready to start doing something concrete with this library.

Examples

import { TribalWarsClient } from "@epicplayera10/tribalwars-api";

let tribalClient = new TribalWarsClient();

tribalClient.on("ready", async () => {
    console.log("Tribalwars client is ready!");
});

// Connect
await tribalClient.connect({
    login: "someusername",
    password: "somepasswd",
    characterId: 123,
    worldId: 456,
});

// Send message to someone
await tribalClient.sendPacket({
    type: "Message/reply",
    data: {
        message_id: 123, // Message ID
        message: "Hello world!"
    }
}, false);

About

TribalWars2.com API Wrapper

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages