Expose bot's guild count on /oauth2/applications/@me #3252
-
Currently, a Discord bot can know its guild count by looking at how many guilds it has in its cache. It could also be an issue if an external service (dashboard ?) wants to get the guild count without having to communicate with the bot itself (what about possible outages). We can estimate that count by multiplicating a shard guild count by the number of shards, but that's still an approximation that might be wrong. If for whatever reason a bot has to get an exact count, the shards must be able to communicate between them. It looks like Discord can get the guild count since it is actually being showed in the bot authorization page, so it could be cool if that property could be exposed in the application object with a parameter like I have not seen any issue about that here so I opened it, hope I haven't missed it if it does exist. |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 5 replies
-
We do something similar on our end as well. The exact count of bot guilds is unknown once a bot gets large enough. We can definitely provide an approximate count, but not an exact count. |
Beta Was this translation helpful? Give feedback.
-
I understand 👌 |
Beta Was this translation helpful? Give feedback.
-
As an expansion, would it be possible to expose this in the Get User endpoint, so you can get any bot's server count via the API? |
Beta Was this translation helpful? Give feedback.
-
I disapprove. I wouldn't want everyone to just have access to this without me knowing it. Even if it's just a number. |
Beta Was this translation helpful? Give feedback.
-
Users can already access it anyway on the OAuth invite page, this would just be to access it via the API |
Beta Was this translation helpful? Give feedback.
-
That's just you assuming everyone has access to my bots oauth page. Private
stuff shall stay private.
…On Fri., May 15, 2020, 01:14 Advaith, ***@***.***> wrote:
Users can access it anyway on the OAuth invite page, this would just be to
access it via the API
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1628 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFI3T7UPGMMDLVS4H327F73RRR3NHANCNFSM4NA3GW2A>
.
|
Beta Was this translation helpful? Give feedback.
-
You only need the client ID to get to your bot's oauth page. Which would a get bot endpoint require too. |
Beta Was this translation helpful? Give feedback.
-
Extension to Taarek's comment: this also works with bots that are set to private! |
Beta Was this translation helpful? Give feedback.
-
I'm going to +1 this. Exposing approximate_guild_count like on /oauth2/authorize would be extemely useful for bot lists. |
Beta Was this translation helpful? Give feedback.
-
With the upcoming partial deprecation of message content, many bots are switching to a rest-only system. Right now, it seems impossible to get this number without connecting to the gateway; can adding this be re-evaluated? An approximate count would be good enough for most use-cases. |
Beta Was this translation helpful? Give feedback.
-
It seems the api part has been already created by the discord team. But it is user scoped only, thus making it impossible for bots to view this non-personal data. |
Beta Was this translation helpful? Give feedback.
-
the current bot's guild count is finally exposed, in the new /applications/@me endpoint (#5971) |
Beta Was this translation helpful? Give feedback.
the current bot's guild count is finally exposed, in the new /applications/@me endpoint (#5971)