Open gniftygnome opened 8 months ago
Here's an example of how Ferry publishes look in Discord (what I'm trying to sort of replicate):
That does look better 👍 Im not sure if I should just update the existing code to use this format, or maybe it would be best to provide some form of customistation for the embed. 🤔
I'm not sure how easy it would be to fit an indefinite number of publish results into a single embed. Ferry only generates at most three plus the mod loader badges. (Speaking of which, it would be cool to have automatic mod loader badges without needing to put the emotes into project configuration, but I don't know if that would be in scope for MPP.)
We do limit the changelog to ten lines, though. I think I recall mention in one of the MPP issues of having MPP generate changelogs from GH. Ferry does this, if you're interested. However, Ferry requires the version numbers for the previous published version and the new published version as properties. Even so, it's a messy process. https://github.com/TerraformersMC/GradleScripts/blob/2.6/ferry.gradle#L35-L96
I dont have a solid idea for an nice API to allow customising of the webhook, Ill have a play and see what I can come up with.
As for the changelogs I think this is worth a new issue to discuss. For Fabric and my own projects ive been using: https://github.com/FabricMC/fabric-action-scripts/blob/main/src/changelog.ts the problem is this is specific to github actions.
Ive had a play and havent come up with a nice idea for this (gradle makes it kinda pain), my best idea is to have an option to select between diffrent styles? Such as the current one, and the one you suggested in this issue, the API would be something like:
discord {
style = "classic" // what the plugin has now
// or
style = "modern" // what you suggested above
}
(better names TBD)
(Speaking of which, it would be cool to have automatic mod loader badges without needing to put the emotes into project configuration, but I don't know if that would be in scope for MPP.)
Have you got any ideas how this would be done?
Ive had a play and havent come up with a nice idea for this
Yeah ... I didn't have something better to suggest. Outside allowing the user to pass in a complete embed definition, which seems likely too technical for the API style you've provided.
my best idea is to have an option to select between diffrent styles?
Yeah, that works for me. I agree it's probably the simplest option. And then a couple optional settings that get ignored if the style is classic.
(Speaking of which, it would be cool to have automatic mod loader badges without needing to put the emotes into project configuration, but I don't know if that would be in scope for MPP.)
Have you got any ideas how this would be done?
In the scope of Minecraft modding, there are only a few loaders; MPP could just keep its own list of the loader badges and emit them at the bottom of the embed or in an extra (optional?) embed based on what loaders are in the settings (modLoaders
). The main reason to do this is it helps just a wee bit with the knee-jerk "port it to X" comments. I think those are more common when somebody sees something and gets excited but finds they can only download it for $not_my_favorite_loader. This isn't a big deal though; I could put them further up (in the content) or even just leave it off.
I've been working on trying to use MPP in Ferry so I don't have to maintain a hot mess of gradle script to publish Terraformers mods. There are a few things I haven't figured out how to reproduce in MPP's Discord publishing. I'll show how Ferry creates its Discord message below.
The main thing I'm wondering is would you consider using an embed for the project data? This would allow setting a thumbnail on the project content, and it would also allow setting the embed color to the project's color scheme.
Here is the Ferry code for Discord messages: