Listen/check for server boost level drop warning

Discord displays a warning if a boost is running out or was removed and the server boost level is gonna drop in I think ~2 days. Is there a way to listen for it or manually check from bot's side if such thing is gonna happen in the coming time?
No description
3 Replies
d.js toolkit
d.js toolkit9mo 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
treble/luna
treble/luna9mo ago
no you can only figure out if a user starts / stops boosting
d.js docs
d.js docs9mo 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.
}
});