Bot.sendMessage("You have bonus now");
return true; // if false - cooldown is not restarted
function onWaiting(waitTime){
// we have active cooldown
Bot.sendMessage("Please wait: " + waitTime + " secs" );
Libs.CooldownLib.user.watch({
// you need name for cooldown
name: "GemBonusCooldown",
time: 120, // cooldown time, 120 secs - 2 minute
Libs.CooldownLib.chat.watch({
// you need name for cooldown
name: "GemBonusCooldown",
time: 120, // cooldown time, 120 secs - 2 minute
// get current cooldown res for chat
let cooldown = Libs.CooldownLib.chat.getCooldown("GemBonusCooldown");
// let cooldown = Libs.CooldownLib.user.getCooldown("GemBonusCooldown");
cooldown.value(); // current cooldown in second
cooldown.set(60 + cooldown.value()) // add 60 sec to cooldown