open-index/open-npm huggingface dataset:
npm package: @infinitybots/kittycat
Description: Kittycat permission system
Author: Rootspring
Latest version: 1.2.0

# Kittycat TS

Typescript library for the kittycat permission system

## Supported Operations

-   `hasPerm`
-   `StaffPermissions#resolve`
-   `checkPatchChanges`

## Structure

A permission is defined as the following structure

`namespace.permission`

If a user has the \* permission, they will have all permissions in that namespace
If namespace is global then only the permission is checked. E.g. global.view allows using the view permission in all namespaces

If a permission has no namespace, it will be assumed to be global

If a permission has ~ in the beginning of its namespace, it is a negator permission that removes that specific permission from the user

Negators work to negate a specific permission _excluding the global._ permission* (for now, until this gets a bit more refined to not need a global.* special case)

Anything past the <namespace>.<permission> may be ignored or indexed at the discretion of the implementation and is _undefined behaviour_

# Permission Overrides

Permission overrides are a special case of permissions that are used to override permissions for a specific user.
They use the same structure and follow the same rules as a normal permission, but are stored separately from the normal permissions.

# Special Cases

-   Special case: If a \* element exists for a smaller index, then the negator must be ignored. E.g. manager has ~rpc.PremiumAdd but head_manager has no such negator

# Clearing Permissions

In some cases, it may desired to start from a fresh slate of permissions. To do this, add a '@clear' permission to the namespace. All permissions after this on that namespace will be cleared

TODO: Use enums for storing permissions instead of strings by serializing and deserializing them to strings when needed

# Permission Management

A permission can be added/managed by a user to a position if the following applies:

-   The user must _have_ the permission themselves. If the permission is a negator, then the user must have the 'base' permission (permission without the negator operator)
-   If the permission is `*`, then the user has no negators in that namespace that the target perm set would not also have

Note on point 2: this means that if a user is trying to add/remove `rpc.*` but also has `~rpc.test`, then they cannot add `rpc.*` unless the target user also has `~rpc.test`
npm package: @infinitybugs/eslint
Description: Shared ESLint configuration for Infinity Bugs projects
Author: infinitybugs
Latest version: 1.0.0

# @infinitybugs/eslint

Shared ESLint configuration for Infinity Bugs projects.

## Installation

```bash
pnpm add -D @infinitybugs/eslint
```

## Usage

In your `eslint.config.js`:

```javascript
import infinityBugsConfig from '@infinitybugs/eslint';

export default [
  ...infinityBugsConfig,
  // your overrides
];
```

## License

MIT
npm package: @infinitygems/mind
Description: The Infinity Gem of mind. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
Author: ElCholoGamer
Latest version: 1.0.0

# @infinitygems/mind

The Infinity Gem of mind. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
npm package: @infinitygems/power
Description: The Infinity Gem of power. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
Author: ElCholoGamer
Latest version: 1.0.1

# @infinitygems/power

The Infinity Gem of power. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
npm package: @infinitygems/reality
Description: The Infinity Gem of reality. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
Author: ElCholoGamer
Latest version: 1.0.2

# @infinitygems/reality

The Infinity Gem of reality. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
npm package: @infinitygems/soul
Description: The Infinity Gem of soul. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
Author: ElCholoGamer
Latest version: 1.0.0

# @infinitygems/soul

The Infinity Gem of soul. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
npm package: @infinitygems/space
Description: The Infinity Gem of space. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
Author: ElCholoGamer
Latest version: 1.0.0

# @infinitygems/space

The Infinity Gem of space. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
npm package: @infinitygems/time
Description: The Infinity Gem of time. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
Author: ElCholoGamer
Latest version: 1.0.0

# @infinitygems/time

The Infinity Gem of time. Used alongside the [Thanos.js](https://npmjs.org/package/thanos.js) package.
npm package: @infinitylist/ap
Description: The easy way to post your bots user, server and shard count stats to the infinity api.
Author: Toxic Dev
Latest version: 0.1.7-alpha.7

# @infinitylist/autoposter
The easy way to post your bots user, server and shard count stats.

> Note: This package will post stats every 5 Minutes by default. 

---


## Supported Libraries
```diff
+ discord.js
```

---

## Example
```js
const { InfinityAutoPoster } = require('@infinitylist/ap')

const poster = InfinityAutoPoster('auth_token', client) // your discord.js client

// Optional logger
poster.on('posted', (stats) => {

  console.log(`Posted stats to the Infinity API | ${stats.servers} servers`)

});
```

---

## Example Error
```js
const { InfinityAutoPoster } = require('@infinitylist/ap')

const poster = InfinityAutoPoster('auth_token', client) // your discord.js client

// Optional error logger
poster.on('error', (err) => {

  console.log(err)
})
```

---

## Example Options

| name             |      description                  |     type   |   default     |
|------------------|:---------------------------------:|:----------:|--------------:|
| interval         |  Interval to post stats at        | Number     | 300000        |
| postOnStart      |  Post when the interval starts    | Boolean    | true          |
| startPosting     |  Interval to post stats at        | Number     | false         |

> Note: if you set `startPosting` to false you will have to call `._start()`

```js
/**
 * INITIALIZE THE AUTO POSTER USING YOUR
 * DISCORD.JS CLIENT WITH OPTIONS
 */
const poster = InfinityAutoPoster(auth, client, { 
    interval: 500000,
    startPosting: true,
    postOnStart: false
});

poster.on('posted', (stats) => {

  console.log(`Posted stats to the Infinity Bot List API | ${stats.servers} servers`)

});

// Optional error logger
poster.on('error', (err) => {

  console.log(err)
})
```

### Example Start Event
```js
/**
 * INITIALIZE THE AUTO POSTER USING YOUR
 * DISCORD.JS CLIENT WITH OPTIONS
 */
const poster = InfinityAutoPoster(auth, client, { 
    interval: 500000,
    startPosting: false,
    postOnStart: true
});

await poster._start();

poster.on('posted', (stats) => {

  console.log(`Posted stats to the Infinity Bot List API | ${stats.servers} servers`)

});

// Optional error logger
poster.on('error', (err) => {

  console.log(err)
})
```
npm package: @infinitylist/client
Description: Simple module for interacting with the infinity webhooks
Author: Toxic Dev
Latest version: 0.1.7-alpha.7

# @infinitylist/client
Official NPM Client for our Autoposter Module!

---

## Webhooks v2

### Available Data
```
{
  "created_at": 0,
  "creator": {
    "avatar": "string",
    "bot": false,
    "discriminator": "string",
    "id": "string",
    "in_guild": "string",
    "nickname": "string",
    "status": "string",
    "username": "string"
  },
  "data": {
    "test": false,
    "votes": 0
  },
  "targets": {
    "bot": {
      "avatar": "string",
      "bot": false,
      "discriminator": "string",
      "id": "string",
      "in_guild": "string",
      "nickname": "string",
      "status": "string",
      "username": "string"
    }
  },
  "type": "BOT_VOTE"
}
```

### Example Fastify Server

- For a basic server we created for you to use go [here](https://github.com/InfinityBotList/Webhook-Server)

```js
const { MessageEmbed } = require("discord.js");
const { Reedhook } = require("@infinitybots/client");
const moment = require("moment");

const webhook = new Reedhook("YOUR_WEBHOOK_SECRET");

module.exports = async (fastify, opts) => {
  fastify.post(
    "/votes",
    webhook.hookListener(async (voteData, req, res) => {

      let embed = new MessageEmbed()
        .setTitle(`Vote Logs`)
        .setColor("RANDOM")
        .setDescription(`Woah someone has voted for me on Infinity Bot List`)
        .addFields(
          {
            name: "Total Votes",
            value: `${voteData.data.votes}`,
            inline: true,
          },
          {
            name: "User",
            value: `${voteData.creator.username}#${voteData.creator.discriminator}`,
            inline: true,
          },
          {
            name: "Time",
            value: `${moment(voteData.created_at)}`,
            inline: true,
          }
        )
        .setTimestamp()
        .setFooter({
          text: "Infinity Vote Logger",
          iconURL: `${voteData.creator.avatar}`,
        });
    })
  );
};
```
npm package: @infinitylist/emitter
Description: Custom event emitter that creates types based off of an interface
Author: Toxic Dev
Latest version: 0.1.7-alpha.7

# @infinitylist/emitter
Event emitter that creates types based off of an interface

---

## Usage Example

> More examples and documentation coming soon

### Node

```js
const { EventEmitter } = require("@infinitybots/emitter");

const ee = new EventEmitter();

ee.on('message', function(text) {
    console.log(text);
});

ee.on('error', function(err) {
    console.error(`Emitter test failed: ${err.stack}`);
})

ee.emit('message', 'Emitter tests complete');
```

### ES6
```js
import { EventEmitter } from "@infinitybots/emitter";

const ee = new EventEmitter();

ee.on('message', function(text) {
    console.log(text);
});

ee.on('error', function(err) {
    console.error(`Emitter test failed: ${err.stack}`);
})

ee.emit('message', 'Emitter tests complete');
```
npm package: @infinitylist/ipm
Description: Infinity package manager!
Author: Toxic Dev
Latest version: 0.1.7-alpha.7

# Infinity Package Manager

> [npm-shrinkwrap](https://docs.npmjs.com/cli/v9/commands/npm-shrinkwrap) based npm package manager
for installing modules while offline or experiencing issues with npm.

---

## What

`@infinitylist/installer` uses `npm-shrinkwrap` and points your `package-lock.json` at [npm](https://www.npmjs.com/)
tarballs checked into your project's source control, so you can install while offline, during a registry outage, or 
during the next [left-pad incident](https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm.html).

## How

1. Read `package-lock.json` or `npm-shrinkwrap.json`.
1. Download the exact same .tgz files that `npm install` fetches from
   [registry.npmjs.org](https://registry.npmjs.org).
1. Decompress the .tgz files into .tar files. This avoids storing binary files
   in Git and removes the cost of decompression during `npm install`.
1. Store the .tar files in your project at `node_modules/*.tar`.
1. Rewrite `package-lock.json` to point at those instead of the registry.

Now your project can be installed while completely offline:

```diff
- npm install
+ npm ci --offline
```

The rest of the npm installation process is exactly the same. The only
difference is that no network activity is necessary when installing and building
your project. The `node_modules` directory can be ignored in your editor
(much like is done with the `node_modules` directory), but is instead checked
into source control.

--- 

## Installation

> Requires npm@7 or higher.

### Install Base Module
```
npm install --global @infinitylist/installer
```

### Generate npm-shrinkwrap.json
```
npm shrinkwrap
```

## Usage

Run `ipm` every time you have modified and installed your dependencies to
produce a new `package-lock.json`.

```
Usage: ipm [options] [directory]

Options:
  -V, --version  output the version number
  -h, --help     display help for command
```
npm package: @infinitylist/logger
Description: Simple module for somewhat cleaner looking console logs
Author: Toxic Dev
Latest version: 0.1.7-alpha.7

# @infinitylist/logger
Simple module for cleaner looking console logs

---

## Usage

### Parameters

| Type     |      Description                        |
|----------|:---------------------------------------:|
| content  |  The content/message for the log        |
| type     |  The type of log you want to send       |


### Types

| Type     |      Description                                               |
|----------|:--------------------------------------------------------------:|
| log      | Default log type displayed with a green id and timestamp       |
| warn     | Warning displayed with a yellow id and timestamp               |
| error    | Error logs displayed with a red id and timestamp               |
| debug    | Debug logs displayed with a white id and timestamp             |
| info     | Info logs displayed with a blue id and timestamp               |

---

## Examples

### Node

```js
const { prettyLogs} = require("@infinitybots/logger");

return prettyLogs('[@infinitybots/logger]: testing warn logs', 'warn');
```

### ES6
```js
import { prettyLogs} from "@infinitybots/logger";

return prettyLogs('[@infinitybots/logger]: testing warn logs', 'warn');
```
npm package: @infinitylist/uptimerobot.js
Description: A JavaScript library for interacting with the Uptime Robot API.
Latest version: 0.0.2

# uptimerobot.js
A simple and intuitive way to interact with the UptimeRobot API v2, allowing users to easily monitor their websites' uptime, downtime, and performance metrics.

---

## Features
- **Easy to Use**: Designed with simplicity in mind, enabling quick integration into your projects.
- **Event-Driven**: Supports event-based responses for real-time monitoring and handling.
- **Promise-Based API**: Offers a promise-based approach for handling asynchronous operations, making your code cleaner and more readable.
- **Flexible Configuration**: Allows customization of request parameters to suit your monitoring needs.
- **Error Handling**: Emits detailed error events for robust error handling and debugging.

---

## Installation
To install `uptimerobot.js`, using npm:

```bash
npm install uptimerobot.js
```

or you can use yarn:

```bash
yarn add uptimerobot.js
```

---

## Usage
First import the `URClient` class from the library:
```js
import { URClient } from "uptimerobot.js";
```

Then initialize the client with your Uptime Robot API Key
> NOTE: read-only keys are required, any other key type will error.

```js
const ur = new URClient({ api_key: "ur1237348731-138175683126-39765382165" });
```

---

## Available Methods
Currently you can only fetch all monitors, we are working on adding more functionality and improvements over-time.

### Get All Monitors
To retrieve all monitors with the default options:

###### Promise

```js
ur.getMonitors().then(monitors => {
    console.log(`Fetched a total of: ${monitors.length} monitors`);
}).catch((err) => {
    console.error(`Error fetching monitors: ${err.message}`);
});
```

###### Events
You can additionally listen to **all** events using our emitter.

```js
await ur.getMonitors();

ur.on("getMonitors", (monitors) => {
    console.log(`Fetched a total of: ${monitors.length} monitors`)
});

ur.on("error", (error) => {
    console.log(`Error fetching monitors: ${error}`)
})
```

---

## Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or find any bugs.

---

## License
This project is licensed under the [MIT License](https://opensource.org/license/mit) - See [LICENSE](./LICENSE) for details!