Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add Discord notifications for threshold failures with user mentions #1898

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rubencosta13
Copy link

📃 Description

This pull request introduces a new feature to notify Discord users when a speedtest threshold is breached. The notifications include the breached metric details and support user mentions in Discord.

🪵 Changelog

➕ Added

  • Feature to send Discord notifications when speedtest thresholds are breached.
  • Support for user mentions in Discord messages.

✏️ Changed

  • Updated Blade template for structured threshold breach notifications.
  • Modified notification settings to include user mention functionality.

📷 Screenshots

image

@rubencosta13
Copy link
Author

I didn't like how the UI turned out to be, possibly a WIP for me...

@svenvg93
Copy link
Contributor

svenvg93 commented Dec 7, 2024

my two cents, would not be nicer to have the Discord User id as part of the Add to Webhooks . So the user can choose per set webhook if there is a user ID wanted or not?

@rubencosta13
Copy link
Author

my two cents, would not be nicer to have the Discord User id as part of the Add to Webhooks . So the user can choose per set webhook if there is a user ID wanted or not?

Yup, kinda makes more sense! TY

@svenvg93
Copy link
Contributor

svenvg93 commented Dec 7, 2024

Then you also don't need the separate settings for it as it will be saved in the json with the discord url :)

@alexjustesen alexjustesen added the 🎉 feature New feature or request label Dec 12, 2024
->label('User ID')
->placeholder('Enter the Discord User ID')
->maxLength(18)
->helperText('This should be the numeric User ID from Discord (e.g., 123456789012345678)'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using the helperText can you add a hint that says "Get User ID" with a link out to the Discord docs here: https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID#h_01HRSTXPS5H5D7JBY2QKKPVKNA

@@ -1,5 +1,9 @@
**Speedtest Threshold Breached - #{{ $id }}**

@if (!empty($mentionUser))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required but you could also use the new @blank and @filled directives merged in #1951.

@alexjustesen
Copy link
Owner

@rubencosta13 if you still want to merge this in just a small change to help with finding a user's ID in Discord. If you no longer want to merge feel free to close the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants