I am currently playing around with guild member notes and as expected keep getting kicked for message spam when I update them too often in a short time.
Now I am wondering if there is any information on how often we can call certain functions before we get kicked in order to prevent calling it too fast.
The EVENT_SPAM_WARNING does not seem to fire in this case and there is no function like GetTradingHouseCooldownRemaining to tell us how long we should wait between calls to SetGuildMemberNote. There is not even any info which functions do have a message limit.
After some trial and error I arrived at waiting 10 seconds after EVENT_GUILD_MEMBER_NOTE_CHANGED is received before running the next SetGuildMemberNote, but this is all pretty fuzzy and I wonder if it can be faster than that. Maybe it would be better to make x calls in y seconds and then wait z second before doing the next batch?
I am really curious how this is handled internally.
Is it a simple token-bucket algorithm? Is it something else?
It would also be good to know if the limit is independent for each function, or if there is a global counter. Right now I only tested it when doing nothing besides calling SetGuildMemberNote, but ultimately I would like to run this during normal gameplay and it would be bad if I get kicked because calls to other functions interfered with it.
Once this is all cleared up I'd like to gather all there is to know about message rate limits on a wiki page.
There are different limits for different API functions from what I have found out. Changing guild notes etc has a much lower limit than sending map pings for example.
As for the map pings, I did some extensive tests on the PTS and found that the limit is 2 calls per second over a prolonged time. But that is a gross oversimplification. Actually it is a bit more complicated. In the latest version of LibMapPings I added a leaky bucket implementation which drops any pings that would go over the limit and get you kicked.
But that implementation also doesn't account for the burst that Chip mentioned and there is also a different limit for in and out of combat:
As long as you stay below the curve, you won't get kicked and in the second image you can see that 2 pings per second is infinitely sustainable.
In general it would be great if ZOS could implement some functionality to prevent getting kicked from the game on the client side. For example a function to get the cooldown for the different functions and also warning events that a call has been dropped if an addon sent too many calls, instead of just dropping the player to the login screen.