Hi, i started making discord bot today just for fun mainly, but also to learn js.
So ive been trying to make a thing for this bot that notify's ppl every hour but i keep getting some odd error, also i really dont know how to do the "pause/sleep"
client.on('ready', () => {
var testChannel = client.channels.cache.get(channel => channel.id === ('*channel id here*'))
setInterval(() => {
testChannel.send("TestMessage");
}, 3600);
});
thats my code so far, it should post Test message but i just keep getting this error, "TypeError: Cannot read property 'send' of undefined"
All help is appreciated.