@ronaldzav/discord-warns-manage

1.0.0 • Public • Published

@ronaldzav/discord-warns-manage

📁 Manage warnings to your members on your discord server

Installation

npm install @ronaldzav/discord-warns-manage

If you are using yarn:

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:

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

Usage

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

  Warn({
    memberId: "12345",
    guildId: '1234567890'
  });
// Get all warns of a guild

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

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

  /* Remove <number> warns of a discord member in this guild. */
// 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

Readme

Keywords

Package Sidebar

Install

npm i @ronaldzav/discord-warns-manage

Weekly Downloads

1

Version

1.0.0

License

Apache-2.0

Unpacked Size

16.5 kB

Total Files

8

Last publish

Collaborators

  • ronaldzav