asocial-duck
DIAdiscord.js - Imagine an app
•Created by asocial-duck on 6/29/2023 in #djs-questions
Member boost counter and detecting "current active boost count" of a member
These days, boosting has become a crucial aspect on Discord. However, developers are not fully informed about the information regarding a member's boost count. The necessary information is not provided through the API.
✅ When a guild member makes a new boost, I can detect it using the guildMemberUpdate event and retrieve the premiumSinceTimestamp information.
✅ Similarly, I can also detect when a member no longer has any boosts through the guildMemberUpdate event.
❌ However, if a member has made two boosts and then cancels one boost, I cannot detect this using the guildMemberUpdate event with the premiumSinceTimestamp. This is because the timestamp does not change as the member still has one boost remaining.
❌ I am unable to determine the current active boost count of a member. This should also be added to the guildMemberUpdate event.
🎯 Taking this information, I intend to set up the following system:
I am calculating the number of days each member has been actively boosting my server, and based on that, I assign roles. Here are some examples: - If a member has 1 boost and doesn't remove it for 1 week, the total boost duration would be 1 week. - If a member has 2 boosts, doesn't remove them for 1 week, and then removes 1 boost after 1 week, and the remaining boost is removed after another week, the calculation would be: 2 boosts x 1 week = 2 weeks, and 1 boost x 1 week = 1 week (total of 3 weeks).In order to reward members during this critical time where boosting is significant, I need to obtain information about how many boosts they have made and if they have made two boosts, I should be able to determine the duration for which both boosts were active. Perhaps with the boost start and boost cancel events, I can obtain more detailed and real-time information.
4 replies
DIAdiscord.js - Imagine an app
•Created by asocial-duck on 3/9/2023 in #djs-voice
player.on(AudioPlayerStatus.Idle, async () => {} not emitting when the song finished
[email protected]
i am using this eventHandler to play next song. But its not emitting when a song finished. This problem started 3/4 days ago....
41 replies
DIAdiscord.js - Imagine an app
•Created by asocial-duck on 1/12/2023 in #djs-questions
where is the spliceOptions() method on v14's main version?
hi guys,
i was using the method on v13.8.1...:
https://discord.js.org/#/docs/discord.js/13.8.1/class/MessageSelectMenu?scrollTo=spliceOptions
now, i'm using the last one, main (14.7.1) version...
but i couldn't find the method on those pages:
https://discord.js.org/#/docs/discord.js/main/class/StringSelectMenuBuilder
https://discord.js.org/#/docs/builders/main/class/SelectMenuBuilder
help me please... i wanna use the perfect method again 😦
15 replies