modmuss50 / mod-publish-plugin

A Gradle plugin to publish mods to a range of destinations
https://modmuss50.github.io/mod-publish-plugin/
MIT License
59 stars 9 forks source link

Question/request expose platform file links to discord content #50

Open supersaiyansubtlety opened 3 months ago

supersaiyansubtlety commented 3 months ago

I'd like to put links to the files uploaded to each platform in discord.content rather than using embeds, since that gives me more control over the formatting.

Are these links exposed? I couldn't find where. If not, could this be added?

modmuss50 commented 3 months ago

This is similar to https://github.com/modmuss50/mod-publish-plugin/issues/28.

I really want to provide a way to fully customise the discord content but I am struggling to think of an ergomic way of doing it. Do you have any suggestions?

supersaiyansubtlety commented 3 months ago

I think having a couple presets like you suggested in #28 would be good, paired with ways to override the content and/or the embed(s) that provide access to the links.

As for exposing the links, would setting the content/embeds like this make sense?

discord.supplyContent(links -> {
    // return String with links
})

discord.supplyEmbeds(links -> {
    // return Iterable<DiscordAPI.Embed> with links
})

where links has a getter for each link (and returns Optional/Provider/@Nullable)

IDK a lot about making groovy DSLs, so IDK if there's a nicer way to provide the links when they're ready.