diff options
Diffstat (limited to '')
-rw-r--r-- | src/DiscordWebhooks.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/DiscordWebhooks.ts b/src/DiscordWebhooks.ts index fcdf57f..77f8575 100644 --- a/src/DiscordWebhooks.ts +++ b/src/DiscordWebhooks.ts @@ -34,6 +34,10 @@ class DiscordWebhooks { this.token = token this.webhookClient = new WebhookClient({ id, token }) + + if (this.config.DEBUG) { + this.webhookClient.on('rateLimit', (data) => console.log(`[DEBUG] Webhook is being rate limited. Timeout: ${data.timeout / 1000}s, Limit: ${data.limit}`)) + } } private parseDiscordWebhook (url: string) { |