premiumSubscriptionCount is NaN
what could be the cause of this?
5 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!* Show your code!
I am trying to emit the guildMemberUpdate event to test a function, but if I log member and newMember the premiumSubscriptionCount value is for both null
To note, the server has currently 2 boosts
i manipulate the event because i do not own a lot of accounts in order to test the function properly.
if i do not clone the object how should i do it then
so by using this code the boost count should be incremented by 1, right?
there is something that I have not completely understood from the results I get
both oldMember and newMember are set to 3 boosts
so what you're saying is that this boost check cant be manually triggered.
but it will work
premiumSince updates only for the first boost though, right?
The Discord API does not provide a dedicated event for guild boosts, but you can check for it in the guildMemberUpdate event:
so that's why listening to the system messages is the only way then.
just sending a cusstom message basically, nothing too fancy
would be nice for it to work for every boost message but if it's not possible i suppose having one is better than nothing
the bot is for a single server which I own which should be fine