AddRole RateLimits

Hi! We are developing the Guild.xyz bot, which is currently managing roles through about 3.500 servers (its even not that much imo), and we have a few rate limit issues already, when we are trying to add or remove roles in real time based on blockchain data. We are trying to do a workound, but as far as we checked, there is no mass role adding in the API, and it is pretty hard, when we have to add/remove like more hundreds of roles at the same time. Could you suggest anything to try out for this case? Because we are afraid, what will happen, if we will manage like 35k servers or so. Thanks a lot, ejay.
9 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey3y ago
You can bulk add roles to single users, not multiple Why are roles changing that often? Rate limits should be per guild I would have thought?
ejay
ejayOP3y ago
Yeah, we are adding bulk roles, but unfortunately that is not enough. Here is a simple case: Currently we have 200 visitors in only ONE PAGE, which guild has 100k members. If these 200 participants would like to join, and they just access at least 1 role, thats 200 seconds in the que. We are listening to off-chain and on-chain events, which triggers role adds/removals as well. For example, if you sell any asset on the blockchain and there is a Guild Requirement for it, that will remove a role from you, if you are not fulfil the requirements. Is it?
monbrey
monbrey3y ago
To be quite honest, managing all of that through roles seems like a bad design based on the number of API transactions needed to do so Why are roles the governing factor here?
ejay
ejayOP3y ago
Because it is like a platformless membership management tool, where community owners could create exclusive content for their members through different platforms, for example discord.
monbrey
monbrey3y ago
I get that, but the volume of transactions it seems you're handling suggests roles are not a good way to manage this I guess its really up to you to discuss it with Discord though. We really have no control over rate limits and such
ejay
ejayOP3y ago
I see, thank you for your answers! heartface
ejay
ejayOP3y ago
One other question, if you may know the answer for this, because I didn't find it anywhere. Are there any rate limit for this endpoint currently? Thankyou.
d.js docs
d.js docs3y ago
Ratelimits are dynamically assigned by the API based on current load and may change at any point. • The scale from okay to API-spam is sliding and depends heavily on the action you are taking • Rainbow roles, clock and counter channels, and DM'ing advertisements to all members are all examples of things that are not okay
Want results from more Discord servers?
Add your server