Auto Spawn Code

Auto Spawn System

I’m thinking of creating a discord.js bot with an automatic spawn system, but I don’t know how to do it and I have no basis for it. So I came for help on how I can make this system.

What do you mean by saying “auto spawning system”? Can you explain the idea of it?

a general summary would be a system just like the Pokécord

I would recommend using the setTimeout() method on the Client object, here are the docs: https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=setTimeout

Usage: 
client.setTimeout(callback, delay, args);
Ex: bot.setTimeout(sendPokemon, 1000, arg); // runs sendPokemon(arg) after 1 second

You can set a random variable using like var delay = Math.floor(Math.random() * max) + min; // time is in milliseconds, max is 2147483647 in your callback, for the next time it runs.

Hope this helps you:)