Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scar17off/evades-js

The Evades.IO API for bots
https://github.com/scar17off/evades-js

bot-api evades-io evades-script nodejs

Last synced: 22 days ago
JSON representation

The Evades.IO API for bots

Awesome Lists containing this project

README

        

# evades-js / EJS
Node.js library for [Evades.IO](https://evades.io/ "Evades.IO").

Installing: `npm i evades-js`.\
**REQUIRES NODE.JS 12.0+!**

![Nodejs](https://img.shields.io/badge/-Node.js%2012.0%2B-brightgreen?style=for-the-badge&logo=node.js&labelColor=1a1a1a)

# Example
```javascript
const EJS = require("evades-js");
const bot = new EJS.Client({
username: "your username",
password: "your password"
});

bot.on("join", () => {
console.log("Connected! Nickname: " + bot.username);
});
```

# Events
`open` - Opened WebSocket connection.\
`close` - Closed WebSocket connection.\
`join` - Joined to the server.\
`messages` - List of messages sent at the same time.\
`rawMessage` - Returns `"nickname: message"`.\
`chatMessage` - Returns ChatMessage class.\
`message` - Decoded WebSocket messages.\
`playerJoin` - Player joined the server.\
`playerLeft` - Player left the server.

# Options
`HeroType (optional)` - Hero type (default: `gameDataProtocol.HeroType.MAGMAX`).\
`wss (optional)` - Hero type (default: `"wss://eu.evades.io/api/game/connect?backend=0&game=0"`).\
`sessionCookie (optional)` - Session cookie for logging in.\
`username, password (optional)` - Account username and password for logging in.\
`server (optional)` - Server id. (1, 2, 3, 4)\
`location (optional)` - Server location. (eu, us)