Question

How to code an autospawn bot

Hello everyone, I’m a noob in coding and I need some help… I would like to create a discord bot like pokecord but I don’t know how to code the Pokémon’s spawn (I think it is every N messages) and I don’t know how to code the Pokémon’s capturing with the command… Sorry if these are dumb problems for you guys but I’m a newby…and sorry for my bad English… I try to explain better, the bot should spawn after some messages (20 for expample) sent by the people in the server, the pokemon is just an embed with the picture and the description, and people can capture them with a command, for example ‘‘P! capture pikachu’’. How can i make the bot spawn these embeds after 20 messages sent by the people? Is that something like a setinterval functions? i mean, if i have a bot and i have and embed… what the code should be to make it spawn every 20 messages? Sorry if i repeat but i’m not sure that i’m clear or not with this question :( thank you very much for answer


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

What I could suggest here is, in case that you wanted to write your own custom bot and have full control on how it works, is to start with this tutorial here on how to build a Discord bod from scratch:

https://www.digitalocean.com/community/tutorials/how-to-build-a-discord-bot-with-node-js

If you have no coding experience, I would recommend this How To Code in JavaScript tutorial series which would give you the fundamental knowledge that you need in order to start writing code.

Regards, Bobby