# setCooldown

*public* setCooldown(**name**: string, **guild**: [Guild](https://discord.js.org/#/docs/main/stable/class/Guild), **user**: [User](https://discord.js.org/#/docs/main/stable/class/User) | [GuildMember](https://discord.js.org/#/docs/main/stable/class/GuildMember), **timer**: string | number): [this](https://away-from-keyboard.gitbook.io/afkhandler/classes/afkhandler)

* **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

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

client.setCooldown("ping", guild, user, "7d 5h 30m 20s")
```
