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 modern message styles and link button and inline link support #61

Merged
merged 16 commits into from
Nov 13, 2024

Conversation

Awakened-Redstone
Copy link
Contributor

@Awakened-Redstone Awakened-Redstone commented Sep 17, 2024

  • Add modern message body with embeds
  • Add link button support (for application created webhooks)
  • Add inline links (put links inside the message body)
  • Add tests for the new styles
  • Update documentation

Classic message body

image

Modern message body

image

Copy link
Owner

@modmuss50 modmuss50 left a comment

Choose a reason for hiding this comment

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

Its not super clear to me what this does, please write some tests for it and add to the documentation.

@Awakened-Redstone Awakened-Redstone marked this pull request as draft September 21, 2024 04:52
- Added modern message style
- Improved support for message components
- Added tests for the new styles
- Added support for components with classic message body
@Awakened-Redstone Awakened-Redstone changed the title [Feature] Add support for message components [Feature] Add modern message styles and link button support Sep 22, 2024
@Awakened-Redstone
Copy link
Contributor Author

The main PR comment has been updated to better reflect the changes from the last commit

@Awakened-Redstone Awakened-Redstone marked this pull request as ready for review September 22, 2024 16:58
@Awakened-Redstone
Copy link
Contributor Author

Weird, the tests passed locally, and the components ones should pass, I made the internal server return that the webhook is application owned

@Awakened-Redstone
Copy link
Contributor Author

Why is DryTest running, it should have been ignored

@Awakened-Redstone
Copy link
Contributor Author

this should fix it

@Awakened-Redstone Awakened-Redstone changed the title [Feature] Add modern message styles and link button support [Feature] Add modern message styles and link button and inline link support Sep 28, 2024
Copy link
Owner

@modmuss50 modmuss50 left a comment

Choose a reason for hiding this comment

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

Looks really good, just a few nitpacks, mostly around the Gradle usage, im happy to make the chages if you want?

src/main/kotlin/me/modmuss50/mpp/ModPublishExtension.kt Outdated Show resolved Hide resolved
src/test/kotlin/me/modmuss50/mpp/test/DryTest.kt Outdated Show resolved Hide resolved
Comment on lines 91 to 93
@JvmField
@Suppress("MemberVisibilityCanBePrivate")
protected val style: MessageStyle = MessageStyle()
Copy link
Owner

Choose a reason for hiding this comment

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

This isnt right, this should be a @Nested Property<MessageStyle>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't able to get it working with @Nested, this was the best I was able to do

Comment on lines 53 to 54
@Suppress("MemberVisibilityCanBePrivate")
class MessageStyle internal constructor() : java.io.Serializable {
Copy link
Owner

Choose a reason for hiding this comment

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

This should be an interface or abstract class, using Gradle properties, let me know if you want me to make this change.

Copy link
Owner

@modmuss50 modmuss50 left a comment

Choose a reason for hiding this comment

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

Epic, thanks.

@modmuss50 modmuss50 merged commit 767451c into modmuss50:main Nov 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants