- Set the minimum Node engine to
>=16.0.0to match pm2's v6. - Dropped support for PM2 v5 or below. It still might work with PM2 v5, as I can't find any major breaking changes in PM2's changelog, but if you have issues with pm2-discord and you're on PM2 v5, I will not fix any issues until you confirm they are still happening in PM2 v6.
-
Implemented requested updates from this PR.
-
added a new
formatoption, default tofalse, that wraps the message sent to Discord with triple-backticks for multi-line code block.pm2 set pm2-discord:format true
-
In the payload to the Discord webhook, set the username to be the process name.
-
-
Rate Limiting Compliance: Fully implemented Discord's webhook rate limiting (30 requests per 60 seconds)
- Automatic throttling to stay within Discord's limits
- Respects
429 Too Many Requestsresponses with automatic backoff - Handles both route-specific and global rate limits
- Parses and uses all Discord rate limit headers (
X-RateLimit-*) - Configurable rate limits via
rate_limit_messagesandrate_limit_window_seconds
-
Invalid Webhook Detection: Prevents repeated 404 errors
- Detects when webhooks are deleted or invalid (404 responses)
- Automatically stops sending to invalid webhooks
- Prevents bans from repeated invalid requests
-
added character limit checks for webhook payload content to not exceed the 2000 character limit.
- Complete rewrite using TypeScript
- Added comprehensive unit test suite
- Added integration tests
- Added proper error handling for network failures and Discord API errors
Update readme with more accurate instructions
- Updated dependencies
- Added Changlelog.md
Initial release after forking the code from pm2-discord and converting it to work with Discord