Boost event

Hello, I would like to know which event to use to detect a boost (even the second if ever)
2 Replies
d.js toolkit
d.js toolkit13mo ago
- 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 OP
d.js docs
d.js docs13mo ago
The Discord API does not provide a dedicated event for guild boosts, but you can check for it in the guildMemberUpdate event:
client.on("guildMemberUpdate", (oldMember, newMember) => {
// Check if the member wasn't boosting before, but is now.
if (!oldMember.premiumSince && newMember.premiumSince) {
// Member started boosting.
}
});
client.on("guildMemberUpdate", (oldMember, newMember) => {
// Check if the member wasn't boosting before, but is now.
if (!oldMember.premiumSince && newMember.premiumSince) {
// Member started boosting.
}
});
Want results from more Discord servers?
Add your server