Javascript Discord.js/Cron-在特定时间发送多条消息

Javascript Discord.js/Cron-在特定时间发送多条消息,javascript,discord.js,Javascript,Discord.js,我希望我的机器人在一天中的特定时间以特定延迟发送特定数量的消息,并每天不断重复。我知道这涉及到Cron的使用,但是我在实现它时遇到了一些困难 const Discord = require('discord.js'); const bot = new Discord.Client(); const reactionEmoji = message.guild.emojis.cache.find(emoji => emoji.name === '7c2gaheiowu31compressed'

我希望我的机器人在一天中的特定时间以特定延迟发送特定数量的消息,并每天不断重复。我知道这涉及到Cron的使用,但是我在实现它时遇到了一些困难

const Discord = require('discord.js');
const bot = new Discord.Client();
const reactionEmoji = message.guild.emojis.cache.find(emoji => emoji.name === '7c2gaheiowu31compressed');
const clientPY = '7xxx45076137459732'

bot.on('message', (message) => {
    const mentionedMembersCollection = message.mentions.members;
    if (message.content.includes('play') || message.content.includes('time')) {
        
        message.react(reactionEmoji);

        const reply = ['No', 'You know? you will get sick', 'You really should stop']
        const show = reply[Math.floor(Math.random() * reply.length)];

        message.send(show)
    }

    if (mentionedMembersCollection.has('4xxx56331777245185') || 
            mentionedMembersCollection.has('70xxx2119722278943')) {
        if (message.author.id === clientPY) {
            message.channel.send('hello')
        }
    }
});

bot.login('ODI1MTxxxxxxxx1NzI4.YF5FAg.3bim466DN7HT_Ixxxxxxxxxxx');

这回答了你的问题吗?