@ronaldzav/discord-warns-manage
v1.0.0
Published
Manage warnings to your members on your discord server
Readme
@ronaldzav/discord-warns-manage
📁 Manage warnings to your members on your discord server
Installation
npm install @ronaldzav/discord-warns-manageIf you are using yarn:
yarn add @ronaldzav/discord-warns-manageYou 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 warnguildId(string) - The id of the discord guildnumber(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 warnguildId(string) - The id of the discord guildnumber(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
