I wan't my bot to answer the "!help" command that people will type on chat but only once every 60 seconds
require('dotenv').config();
const tmi = require('tmi.js');
const client = new tmi.Client({
channels: [ 'test' ],
identity: {
username: process.env.TWITCH_BOT_USERNAME,
password: process.env.TWITCH_OATH_TOKEN
}
});
client.connect();
client.on('message', (channel, tags, message, self) => {
const send = message === "!help"
if ( !send ) return;
{
client.say(channel, `This message shouldn't send more then once eveyr 60 seconds`)
}
console.log(`${tags['display-name']}: ${message}`);
}); ```