npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

diepbuddy-client

v1.0.16

Published

client for diepbuddy

Downloads

19

Readme

diepbuddy-client

NPM version license

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 |