discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.2k stars 3.96k forks source link

get all users boost from the server #5045

Closed SnaffX closed 3 years ago

SnaffX commented 3 years ago

Is your feature request related to a problem? Please describe. The lack of booster information on the server

Describe the ideal solution Addition of an Object on the server with all booster users and the amount of boost

Fyko commented 3 years ago

There is no way to determine how many boosts a user has to any specific guild. The only information Discord gives us is how long they've been boosting.

const members = await <guild>.members.fetch();
const boosters = members.filter(m => m.premiumSinceTimestamp);
SpaceEEC commented 3 years ago

There is an issue on discord's api docs issue tracker for the amount of boosts per user: https://github.com/discord/discord-api-docs/issues/1182

SnaffX commented 3 years ago

in the future could be added the amount of boost per user on the server?

SpaceEEC commented 3 years ago

That is on Discord to do, see the issue I linked. Once they expose that data somehow, we can add support for that.