Useful Links:

https://discord.com/developers/docs/topics/rate-limits

https://discordjs.guide/sharding/#when-to-shard

https://support.discord.com/hc/en-us/articles/360032008192-Announcement-Channels-

discordjs discord link that I’m too lazy to get an invite from


Context

With development of Nessie’s automatic status coming to an end, the only thing left to tackle was how to properly update every map status in every guild that it’s being used in. Sure it works perfectly when testing it in Nessie’s discord server; but that’s just one guild. How would it fare with 10 servers? 100? Heck at the rate of Nessie’s growth it’ll be at 1000 at the end of the year

On that note, this is a pretty important issue to solve. One could argue this should have been spiked on right at the beginning and not after development has started but hey, we’re still scuffed at times 🤷 I’ll admit dealing with rate limits was something I’m not familiar on and the fact that discord and discord js doesn’t readily tell you what are the limits doesn’t give me confidence either

Hopefully by the end of this doc, we’ll come out at least knowing these limitations and fingers crossed, still make it possible for Nessie’s auto updates to work

Approaches

Before we get there, it’s probably a good idea to outline the approaches that could be used by Nessie or well, any other bot that would want an automatic message update functionality. For context, this particular feature I’m creating for my bot is to update a message every X minutes with map rotation data of Apex Legends

Each approach has their own merits; some with better UI, some with easier implementation but in the end, what matters is which is the more efficient in using the Discord API. I’ll probably update them accordingly later based on what’s possible with the rate limits

Editing Message

Creating + Deleting Message

Interaction Replies

Publishing in Announcement Channel

Webhooks

Rate Limits