open-index/open-npm huggingface dataset:
npm package: @ronaldzav/discord-warns-manage
Description: Manage warnings to your members on your discord server
Author: RonaldZav
Latest version: 1.0.0

# @ronaldzav/discord-warns-manage
📁 Manage warnings to your members on your discord server

## Installation

```bash
npm install @ronaldzav/discord-warns-manage
```
If you are using yarn:

```bash
yarn add @ronaldzav/discord-warns-manage
```

You can use the latest version of `discord-warns-manage` by adding it as a dependency to your `package.json`:

```bash
    "dependencies": {
      "@ronaldzav/discord-warns-manage": "github:ronaldzav/discord-warns-manage"
    }
```

## Usage

```js
const { Warn, GuildWarns, UnWarn, ResetWarns } = require('@ronaldzav/discord-warns-manage');
```

```js
// Warn a discord member

  Warn({
    memberId: "12345",
    guildId: '1234567890'
  });
```

```js
// Get all warns of a guild

  let warns = GuildWarns(1234567890);
  console.log(warns); // [{ memberId: "12345", guildId: '1234567890' }, ...]
```

```js
// Unwarn a discord member

  UnWarn({
    memberId: "12345",
    guildId: '1234567890'
    number: 1 // default is 1
  });

  /* Remove <number> warns of a discord member in this guild. */
```

```js
// Reset warns of a guild

  ResetWarns(guild);
```

## CLASSES

### `Warn(options)`

#### options
- `memberId` (string) - The id of the discord member to warn
- `guildId` (string) - The id of the discord guild
- `number` (number) - The number of warns to add . Default is 1.

### `GuildWarns(guildId)`

#### guildId
- (string) - The id of the discord guild

Returns an array of warns of a guild.

### `UnWarn(options)`

#### options
- `memberId` (string) - The id of the discord member to warn
- `guildId` (string) - The id of the discord guild
- `number` (number) - The number of warns to remove. Default is 1.

Unwarn a discord member in a guild.

### `ResetWarns(guildId)`

#### guildId
- (string) - The id of the discord guild

Reset warns of a guild.

## LICENSE
Apache-2.0  
Copyright 2024 Ronald Zavaleta
npm package: @ronaldzav/local-storage
Description: Local storage system for your nodejs application
Author: RonaldZav
Latest version: 1.0.3

# @ronaldzav/local-storage
📁 Local storage system for your discord bot

## Installation

```bash
npm install @ronaldzav/local-storage
```
If you are using yarn:

```bash
yarn add @ronaldzav/local-storage
```

You can use the latest version of `local-storage` setting this in your package.json:

```bash
    "dependencies": {
      "@ronaldzav/local-storage": "github:ronaldzav/local-storage"
    }
```

## Usage

```js
const { Database } = require('@ronaldzav/local-storage');

let myFirstDB = new Database()
.setFolder('./storage')
.setName('guild-123')
.setDebug(true);

myFirstDB.data = { 
  "1": { "name": "Mario", "age": 10 }, 
  "2": { "name": "Maria", "age": 10 }, 
  "3": { "name": "Luigi", "age": 10 } 
  };

myFirstDB.save(); // Save the database

console.log(myFirstDB.find(element => element.name == "Mario")); // Output: [ { name: 'Mario', age: 10 } ]
```

## API

### `new Database()`

#### setFolder(folder)

Set the folder where the database will be saved.

#### setName(name)

Set the name of the database.

#### setDebug(debug)

Set the debug mode.

## METHODS

#### save()

Save the database.

#### find(filterFunction)

Find an element in the database.