server boost event and boost revoke event
is there a way to detect when a server gets boosted and when the boost gets revoked?
13 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!
- ✅
Marked as resolved by staffThe Discord API does not provide a dedicated event for guild boosts, but you can check for it in the guildMemberUpdate event:
this only works in a scenario where the user has not boosted before and is boosting for the first time
it is not possible to see when a user cancels their boost or boost server (for example if the user is already boosting the server and boost again, this if will return false)
at least, Discord currently does not send an event to the bots when a user boosts a server or cancels a boost. I think this kind of approach is not a complete solution
i dont care for it to detect the second boost
i just need to detect when a person boosts and unboosts
maybe i can use the role for that? like check role updates
then the snippet above should work for you
yeah but i need it to detect when they revoke the boost
will this work for that?
it is not possible to see when a user cancels their boost
i mean is it possible by checking their roles?
yes detecting 0 boost -> 1 boost & 1 boost -> 0 boost is possible by checking roles
but revoking is not detectable
how is it not possible with this though?
wdym revoking
like when someone has 2 boost & cancels 1 boost, you cant detect, because the user will still have a role
i dont care about the second boost. i only care if a person is boosting or not
doesnt matter the quantity
..