diepbuddy-client
v1.0.16
Published
client for diepbuddy
Downloads
19
Readme
diepbuddy-client
Description
I created this project to use glitch projects as proxies. diepbuddy-client will automatically connect to your WebSocket server and will emit 'login'.
To create a bot you simply emit 'Bot open' with the partylink. diepbuddy-client will either respond with the 'Bot accept' or 'Bot error' event.
Im using this for Diep.io Tool.
Works well in combination with https://github.com/Cazka/diepbuddy-server.
Installation
npm install diepbuddy-client
How to use
The following example creates a HTTP server listening on port 3000
and runs diepbuddy-client.
const express = require('express');
const app = express();
const BuddyManager = require('diepbuddy-client')();
app.get('/', (request, response) => {
response.send('x');
});
app.listen(3000);
Set the enviromental variable SERVERURL
and AUTHKEY
if you use any.
The Protocol
4 datatypes are used: uint8, uint16, string and ArrayBuffers/Uint8Array
Strings will always end with 00
.
Serverbound Packets
| ID | Description |
| ---- | ----------- |
| 00
| login |
| 08
| heartbeat |
| 23
| bot accept |
| 24
| bot message |
| 25
| bot close |
| 26
| bot error |
08
heartbeat
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ---------- | ----------- |
| +0 | 1 byte | uint8
| packet id |
23
bot accept
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ---------- | ----------- |
| +0 | 1 byte | uint8
| packet id |
| +1 | 2 bytes | uint16
| index |
| +3 | n bytes | String
| link |
24
bot message
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ------------ | -------------------- |
| +0 | 1 byte | uint8
| packet id |
| +1 | 2 bytes | uint16
| index |
| +3 | n bytes | Uint8Array
| clientbound from bot |
25
bot close
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ---------- | ----------- |
| +0 | 1 byte | uint8
| packet id |
| +1 | 2 bytes | uint16
| index |
26
bot error
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ---------- | ----------- |
| +0 | 1 byte | uint8
| packet id |
| +1 | 2 bytes | uint16
| index |
| +3 | n bytes | String
| link |
Clientbound Packets
| ID | Description |
| ---- | ----------- |
| 08
| heartbeat |
| 20
| bot open |
| 21
| bot send |
| 22
| bot close |
08
heartbeat
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ---------- | ----------- |
| +0 | 1 byte | uint8
| packet id |
20
bot open
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ---------- | ----------- |
| +0 | 1 byte | uint8
| packet id |
| +1 | n bytes | String
| link |
20
bot send
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ------------ | -------------------- |
| +0 | 1 byte | uint8
| packet id |
| +1 | 2 bytes | uint16
| index |
| +3 | n bytes | Uint8Array
| serverbound from bot |
22
bot close
| Offset | Size(s) | Value Type | Description |
| ------ | ------- | ---------- | ----------- |
| +0 | 1 byte | uint8
| packet id |
| +1 | 2 bytes | uint16
| index |