Question about containers

I have a game bot that uses a large amount of interaction.update() calls to update embed content. Would it be more resource-intensive for the bot to use Containers, or would the performance be similar?
4 Replies
d.js toolkit
d.js toolkit2mo ago
Amgelo
Amgelo2mo ago
you shouldn't update messages so often that container building performance becomes a concern that'd get you ratelimited really quick even with 100 times a second, the performance of building any object should be negligible
mrootsmi
mrootsmiOP2mo ago
I don't currently get rate limited with interaction.update(), but I'm worried that using Containers might make the bot feel "heavier" for users (in terms of Discord client performance/rendering) or making the bot slower somehow
Amgelo
Amgelo2mo ago
it certainly won't make the bot slower, and the discord client should be optimized enough to handle that you'd probably need to create several tens of thousands per second (and it's not possible to do message updates that often) for that logic to start to become noticeable in terms of performance mostly because of the validations and even then you can not use the builders so you skip the validations and you're back to square one

Did you find this page helpful?