0

I need to make an automatic message that sends every 15 minutes, to be able to "collect" the balls. The point is when using the pickup command, delete the message and if the player has collected the pickup command, start the timer back for 15 minutes.

    client.on("message", message => {
            const embed = new MessageEmbed()
                  .setColor("RANDOM")
                  .setTitle(``)
                  .setImage(takemoney[Math.round(Math.random() * (takemoney.length - 1))])
                setTimeout(function() {
                  message.channel.send(`Lying on the floor ${balls}, use ;;pick to pick it! `, embed)
                  }, 900000);
              })  

How to stop the timer before using the pickup command and resume the timer after using it?

Dmitry S.
  • 1,544
  • 2
  • 13
  • 22

0 Answers0