Add support for multiple Discord webhooks with per-webhook thresholds#15
Open
bartschliam wants to merge 2 commits into
Open
Add support for multiple Discord webhooks with per-webhook thresholds#15bartschliam wants to merge 2 commits into
bartschliam wants to merge 2 commits into
Conversation
Author
|
Hi @fsvreddit, I just submitted a PR that adds support for multiple Discord webhooks with per-webhook thresholds. I thought this would be a useful feature for mod teams that want to:
I'm happy to refine this based on your feedback, or if you'd prefer to implement it differently, just let me know! Would love your thoughts on whether this approach works for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
How it works
Multiple Webhooks
Users can enter multiple Discord webhook URLs in the "Discord webhook URLs" setting, each on a new line:
https://discord.com/api/webhooks/123456789/abc
https://discord.com/api/webhooks/987654321/xyz
Per-Webhook Thresholds
Users can optionally set different thresholds for specific webhooks in the "Per-webhook thresholds (optional)" setting. Format: one per line as
WEBHOOK_URL|threshold:NUMBER|ageHours:NUMBERExample:
https://discord.com/api/webhooks/123456789/abc|threshold:20|ageHours:12
https://discord.com/api/webhooks/987654321/xyz|threshold:50|ageHours:24
If left blank, all webhooks use the default global thresholds.
Use Cases
Backwards Compatible
Existing setups with a single webhook continue to work exactly as before. The per-webhook thresholds feature is completely optional.