Humoroussix2799
Humoroussix2799
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Humoroussix2799 on 8/14/2023 in #djs-questions
Multiple Schema creation on message for level???
So basically I have the leveling system and on the surface it seems to work, but there is just a few issues when I send a message 1. it creates more than one level schema (anywhere from 2-13) 2. the cooldowns dont work I am really scratching my head on this one since Ive tested with console.logs and the actual function is only called once succsefully as seen here:
connected to db
RpgBot#1051 is online
xpGiver function called
INCORRECT
xpGiver function called
xpGiver function called
INCORRECT
connected to db
RpgBot#1051 is online
xpGiver function called
INCORRECT
xpGiver function called
xpGiver function called
INCORRECT
(incorrect following the call means it didnt run the code bc its a bot) so it is only called once, yet, the bot sends the level up message multiple times. After that it works perfectly fine except cooldowns wont work but it only levels up and changes the data of one of the schema not all, heres what really confusing. It creates an almost random amount of schema like I said 2-13 in the provided screenshot it made 12. Also even when removing cooldowns it does the same thing?!?! I just dont know what could cause it?
3 replies
DIAdiscord.js - Imagine an app
Created by Humoroussix2799 on 8/13/2023 in #djs-questions
Leveling system not working
So the issue is that when trying to make aleveling system and send the data tyo mongoDB it seems to not even be calling in the message interaction, but an even weirder part is that when I make it a slash command it does seem to call, however it immediatly halts with the if statement at the beginning? All I really want to do is make a simple leveling system that gets sent to mongoDB when A user sends a message in the guild.
5 replies