Added cooldown to more vojs

This commit is contained in:
Histmy 2021-07-27 01:08:44 +02:00
parent b00eea7bc6
commit 51854de580

View File

@ -1,6 +1,9 @@
// Cokoliv co má něco společnýho s vojsem
const fs = require('fs');
const { formatCas } = require("../addons/utils.js");
let vojsKuldan = 0;
function vypocitatCas(vojsl) {
let c = new Date();
@ -77,6 +80,13 @@ module.exports = {
break;
}
const rozdil = (Date.now() - vojsKuldan) / 1000;
if (rozdil < 14_400) {
mes.channel.send(`\`${process.env.PREFIX} vojs\` muzes pouzit jyz zua ${formatCas(14_400 - rozdil)}`);
break;
}
vojsKuldan = Date.now();
if (celArgs !== 'potichu') mes.channel.send('<@&591306633196339261> vojs');
if (mes.guild.voice) {