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

cumsocket

v1.2.0

Published

Basic discord selfbot written in typescript with pure websocket

Downloads

13

Readme

Cumsocket

Cumsocket is a simple Discord selfbot library based on pure websocket and node-fetch. It's designed to use modules as event receivers to easily add own modules.

About / Worth Mentioning

  • Cumsocket is mainly designed for personal use but I made it public anyway.
  • Library is ES Module only and it should be used with TypeScript because of decorators.
  • It has a PostgreSQL built-in because I had to integrate it with heroku postgres but it can be ignored.
  • Api wrapper is still in development has only a few parts of the api implemented.
  • It's designed to be safe but there is no science and cookie support yet.
  • Selfbotting is forbidden by Discord's TOS and you can get banned for it. Using it on your main account is not recommended.

Installation

npm install cumsocket

Usage

import { Client, Module, EnvConfig } from 'cumsocket';

// Create a new client instance
const client = new Client({ authorization: process.env.TOKEN });

// Register a module
client.loadModule(class MyModule extends Module {
  public readonly id: string = 'myModule';
  public readonly ctx!: Client;
  public readonly env: EnvConfig = {
    example_var_1: "string",
    example_var_2: "number",
    example_var_3: "boolean",
  };

  // public readonly env: EnvConfig = ["example_var_1", "example_var_2"];
  // public readonly ignore: boolean = true;

  // Called when the module is loaded
  public async init(ctx: Client): Promise<void> {
    Client.log('MyModule', 'Module initialized');
    const exampleVar1: string = this.env('example_var_1');
    const exampleVar2: number = this.env('example_var_2');
    const exampleVar3: boolean = this.env('example_var_3');
  }

  // Called when the client is ready
  public async ready(ctx: Client): Promise<void> {
    Client.log('MyModule', 'Client ready');
  }

  // Called when the client receives a MESSAGE_CREATE event
  @Client.listen("MESSAGE_CREATE")
  public async onMessage(data: any): Promise<void> {
    Client.log('MyModule', 'Message received');
  }

  // Called when the client receives a MESSAGE_UPDATE or MESSAGE_DELETE event
  @Client.listen("MESSAGE_UPDATE", "MESSAGE_DELETE")
  public async onMessageUpdateOrDelete(data: any): Promise<void> {
    Client.log('MyModule', 'Message updated or deleted');
  }
});

TODO:

  • Documentation
  • More examples