usuario_366
usuario_366
DIAdiscord.js - Imagine an app
Created by usuario_366 on 10/3/2023 in #djs-questions
Circular dependency
Hi, I'm new to creating bots, and this is my first bot. The idea is to make an rpg bot, integrated with my server. When started, it calls spawnCreatures.js, which will make the bot send random messages, from creatures randomly searched for in the database, in random channels, which are part of the game map (each channel is a location on the map, present in the database data). Each message will be an independent creature, and will have a button to start combat. If I click the combat button, every now and then, the creature should attack me, subtracting my life on the field from the database. However, with a recent modification I made to spawnCreatures.js, adding the new newMessages module, it gives an error as soon as the creature tries to attack me, talking about circular dependency. I have no idea what this is, but it must have something to do with this new module. Would anyone know the reason? Obs: v14.10.2
6 replies
DIAdiscord.js - Imagine an app
Created by usuario_366 on 7/21/2023 in #djs-questions
Unknown interaction
The idea is to use a slash command to run a separate js file, which would reduce hunger and thirst. If any of the two arrived at 15, he would send a message, through the interaction, that he needed to drink, urgently. However, when I execute the slash command, and the js file is also executed afterwards, when sending the message through the interaction, when I reach 15, it says that the interaction is unknown.
6 replies