level up message
so I am having an issue with the level up message not sending... the console doesn't throw and errors or anything so I am just confused why it doesn't send a levelup message
17 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!if nothing is being logged, it's not reaching those if statements where it would send the message in the first place
If you aren't getting any errors, try to place
console.log
checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn moreChannelType
enum(see the post tags)
Ah, well... sometimes i forget there are other versions my bad
There are no error logs or anything, everything else is working within that code except for that
Just in total confusion tbh lol
which is why you should do this to see where execution stops
alright i'll add it in a few different places and see what happens
so
I have added some in
the one that does not show up on the console is console.log("this is working#1")
any ideas?
but #2 does log?
I have clarified that the levelupchannel is correct
#2 does
#3 and #2 does
then it sounds like
ExperienceHelper.getLevel(newExp - PER_MESSAGE) < ExperienceHelper.getLevel(newExp)
is false
this is leaving the scope of this channelSo where would I go about fixing this exactly? I am just stuck here tbh, been trying to look at it multiple times, changing things etc
no idea what
ExperienceHelper
is or how getLevel
is written, but you should probably start there or at the very least log what each call returns (as mentioned here)
that is the experiencehelper
getlevel is within the same as well
I mean nothing else within the code has anything else to do with the levelupmessage either, which is why I am confuse because it did all work before in the past
or at the very least log what each call returnsso have you done this?
I’ll try it here shortly, got busy last night and am now just getting up
So yeah everything seems to be working fine except the end of code
This is the only thing that does not come up in logs
but also doesn't error either, which is weird
I have done that.
I put a log in the experiencehelper.ts where each return would be
and they all work
I've gotten it to work.
Changed it to that and it seemed to work
Sorry for the late reply I been busy