Added cooldown to more vojs
This commit is contained in:
parent
b00eea7bc6
commit
51854de580
@ -1,6 +1,9 @@
|
|||||||
// Cokoliv co má něco společnýho s vojsem
|
// Cokoliv co má něco společnýho s vojsem
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const { formatCas } = require("../addons/utils.js");
|
||||||
|
|
||||||
|
let vojsKuldan = 0;
|
||||||
|
|
||||||
function vypocitatCas(vojsl) {
|
function vypocitatCas(vojsl) {
|
||||||
let c = new Date();
|
let c = new Date();
|
||||||
@ -77,6 +80,13 @@ module.exports = {
|
|||||||
break;
|
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 (celArgs !== 'potichu') mes.channel.send('<@&591306633196339261> vojs');
|
||||||
|
|
||||||
if (mes.guild.voice) {
|
if (mes.guild.voice) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user