это недостоверная информацияс вашей стороны не обоснованно.
const path = require('path')
const fs = require('fs')
module.exports = (client) => {
const readCommands = (dir) => {
const files = fs.readdirSync(path.join(__dirname, dir))
for (const file of files) {
const stat = fs.lstatSync(path.join(__dirname, dir, file))
if (stat.isDirectory()) {
readCommands(path.join(dir, file))
} else if (file !== 'handler.js') {
const command = require(path.join(__dirname, dir, file))
console.log(`[Commands] Enabling command "${file}"`)
command(client)
}
}
}
readCommands('.')
}
const args = message.content.slice(gld.prefix.length).trim().split(/ +/g);
const cmdName = args.shift().toLowerCase();
const command = client.commands.get(cmdName) || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(cmdName));
if(!require('../config.json').owner.includes(message.author.id) && command.help.public !== "true") return;
command.run(client, message, args, config);
const args = message.content.slice(guild.prefix.length).trim().split(/ +/g);
const cmdName = args.shift().toLowerCase();
const command = client.commands.get(cmdName) || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(cmdName));
global.cdds = new Set();
global.cooldown = function cd(user,ms) {
if(!cdds.has(user)) {
cdds.add(user);
setTimeout(() => {
if(cdds.has(user)) cdds.delete(user);
},ms)
return 0;
}
else return 1;
};
if(cooldown(message.author.id, COOLDOWN_TIME_IN_MS)) return 1 && message.channel.send('Подождите немного!');
client.on('message', async(message) => {
if(message.author.bot) return;
if(message.content == 'Привет!') {
if(cd(message.author.id, 5000)) return 1 && message.channel.send('Подожди немного!');
message.channel.send('Привет!')
}
})
message.guild.member(args[0])
вместо message.guild.members.cache.get(args[0])