Limit Gateway Presence Data #6004
Replies: 2 comments 10 replies
-
From my understanding is that not the user has a presence but a guild member, which doesn't really makes sense in my eyes why it would be like that. So getting rid of redundant events would be moving from member presence to user presence in discord's API. For getting data which the bot client doesn't need, a possible solution would be more in-depth intents for presence data. |
Beta Was this translation helpful? Give feedback.
-
Just for example how heavy can this be, imagine we have 10 users using vscode rich presence and they share 10 servers with bot, that is 10 times every line you switch, can't we make it only 1, like this is seriously needed to consider. nSidUFqDe.mp4 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Discord's Gateway provides real-time updates for various events, including presence updates. Presence updates are a key component of Discord's platform, allowing users to see the status and activity of their friends and guild members. However, for bots with a large number of guilds, the amount of presence data received can be overwhelming and inefficient. For example, if a bot is in 1,000 guilds and receives full presence updates for all users, it can use up to 300GB of traffic per month. This is a significant amount of data, and much of it is likely to be irrelevant to the bot's specific use case. As such, there is a need to find a way to limit the amount of presence data that bots receive.
One possible solution is to allow developers to specify which fields they want to receive in each presence update. This would allow bots to receive only the data they actually need, reducing the amount of traffic and resources required to process the data. For example, a bot that only needs to know a user's status and guild ID could specify those fields, while ignoring activities and client status. Another potential improvement would be to add a separate presence event for each user, rather than receiving presence data for all mutual guilds. Currently, when a user's presence changes in any mutual guild, the bot receives a presence update for that user in all mutual guilds. This can result in a significant amount of redundant data being transmitted, as the user's presence is identical across all guilds.
In conclusion, these proposed changes would greatly benefit bot developers by reducing the amount of traffic and resources required to process presence data. By allowing developers to specify which fields they want to receive and by adding separate presence events for each user, bots would be able to receive only the data they need, resulting in a more efficient and effective process.
TL;DR: Allow us to limit data we'd like to receive and potentially disabling updates from all mutual servers because users can't have multiple presences.
Beta Was this translation helpful? Give feedback.
All reactions