Hello I am trying to do sending message all my friend from my discord bot(Js) when ı write &acil,but when ı write this commands something is going wrong and sending so much messages and sometimes giving => TypeError: Cannot read property 'send' of undefined error
require("dotenv").config();
const fetch = require("node-fetch");
const Discord=require("discord.js");
const client = new Discord.Client();
client.on("message",message =>{
console.log("Gelen mesaj"+message.content);
if(message.content === "&acil")
message.client.users.cache.get('777206236986474526').send('ACİL TOPLANTI!');
message.client.users.cache.get('675607935380094986').send('ACİL TOPLANTI!');
message.client.users.cache.get('777206236986474526').send('ACİL TOPLANTI!');
message.client.users.cache.get('7175607935380094986').send('ACİL TOPLANTI!');
});
message
at the beginning and let it simply beclient.users.cache.get('userID').send('');
instead – PerplexingParadox