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

DSRV Alerts-style functionality for new downloads (and maybe even other events) #3

Open
GreemDev opened this issue Dec 23, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@GreemDev
Copy link

GreemDev commented Dec 23, 2022

From Discord:

I think it'd be pretty neat to have the ability to send an embed, with a configuration that I guess could be similar to alerts, when new versions are obtained by the server, with placeholders
My idea is that I could have new downloads be posted to the discord with like a "build for commit 4535r43" and a download url for the specific version
I guess it'd kinda be like another webhook in the same place where the webhook is already used

I'd also like to say, if this gets added I would also ask for a way to send a test message with placeholder useless info just to test the format, because I really wouldn't want to have to keep committing to a project to test the download embed

@GreemDev GreemDev changed the title DSRV Alerts-style functionality for new downloads DSRV Alerts-style functionality for new downloads (and maybe even other events) Dec 23, 2022
@GreemDev GreemDev added the enhancement New feature or request label Dec 23, 2022
@Vankka
Copy link
Member

Vankka commented Dec 23, 2022

Right now it just posts hard coded messages to the single webhook url set in the config for all channels, a few things that come to mind from this;

  • allowing multiple different 'notification' destinations/formats,
  • some spring expression(-ish) way to choose what triggers what notification, eg. reponame == "DiscordSRV" && channel == "release" && event == "new_version_available"
    • Events are probably only version processing (auto updates to success/failure), new version available and startup/refresh warnings/errors
  • and then probably a similar format to DiscordSRV's for defining message content + all the embed fields & such

@GreemDev
Copy link
Author

GreemDev commented Dec 23, 2022

Instead of SpEL I'd use Starscript, which is at the very least an enhanced String.format.

This is because I can't really see a reason to use things outside of what is defined by whatever is configured in Starscript.
In DSRV it makes sense, because there's literally thousands of other plugins people could want to interface with, but here it's just a downloader. Plus, Starscript is very easy to use as it's just "text {some.code().here}".

You can see how Starscript is used here.

In my fork of the project that links to, Meteor Client, I have some kotlin extensions that allow the functions to be declared more concisely than that of what Meteor does in Java, if you're willing to use some Kotlin.

If you're open to having some Kotlin I can PR in these things if you want.

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

When branches are created from issues, their pull requests are automatically linked.

2 participants