mw-discord
mw-discord copied to clipboard
Handle high-frequency editing/logs
Discord rate-limits individual channels to 5 messages a second (though the documentation says to use API headers instead of hard-coding assumptions about rate limits); when a wiki is experiencing action rates greater than this (e.g. if $wgDiscordNoBots
is set to false, and a few bots are running simultaneously (or one really high-rate bot is running)), messages will fail to send. Possible solutions are to retry sending on receiving an error (reasonable for sudden transient spikes) or collecting multiple actions into a single message (would be required for longer durations of high-frequency actions). Dropping messages should probably be avoided unless explicitly opted-in (maybe accompanied by dropping an extra message to be able to send a "X messages dropped, see recent changes on-wiki" notification).