📕
AFKHandler
  • Introduction
  • FAQ
  • Changelog
  • Classes
    • AFKHandler
    • Command
    • SlashCommand
    • Event
    • Feature
  • Methods
    • Commands
    • SlashCommands
    • deleteSlash
    • Events
    • Features
    • load
    • setCooldown
    • time
    • convert
    • convertLong
  • Types
  • AFKHandlerInteraface
  • AFKHandlerOptions
  • CommandInterface
  • SlashCommandInterface
  • EventInterface
  • FeatureInterface
  • CommandHelp
  • (Callbacks)
  • (Utils)
Powered by GitBook
On this page

Was this helpful?

  1. Methods

setCooldown

Sets a cooldown

PreviousloadNexttime

Last updated 3 years ago

Was this helpful?

public setCooldown(name: string, guild: , user: | , timer: string | number):

  • name: command name for cooldown

  • guild: guild where the cooldown is

  • user: what user will receive the cooldown

  • timer: how much time will be the cooldown

const guild = await client.guilds.fetch("4653644376432423")
const user = await client.users.fetch("65438525554545655")

client.setCooldown("ping", guild, user, "7d 5h 30m 20s")
Guild
User
GuildMember
this