1.0.1 • Published 3 years ago

discord-cooldown v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

discord-cooldown

A simple message cooldown module for DiscordJS V12.


Support


Installation

npm i discord-cooldown@latest


Constructor

Base customization for the module.

EntryTypeDefinition
#1CLIENTYour client variable
#2STRINGThe channel id to set the cooldown in
#3INTEGERThe days for the cooldown to last ('5', '18', '1', '3')
#4INTEGERThe limit of messages to fetch (SHOULD keep under 25)
#5BOOLEANWhether or not to toggle debug mode and error logs

Code Example

const Discord = require('discord.js')
const client = new Discord.Client({ partials: ['CHANNEL', 'MESSAGE', 'GUILD_MEMBER', 'USER'] })
const fart = require('discord-cooldown')
const cooldown = new fart(client, '848346040511758356', 1, 3, true)

client.on("ready", () => {
    console.log(`I AM READY!!!!`)
});

client.on('message', async message => {
    await cooldown.cooldownCheck(message)
});

client.login('YOUR_BOT_TOKEN')