-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
There was a problem hiding this 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.
src/main/kotlin/me/modmuss50/mpp/platforms/discord/DiscordAPI.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/me/modmuss50/mpp/platforms/discord/DiscordWebhookTask.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/me/modmuss50/mpp/platforms/discord/DiscordWebhookTask.kt
Outdated
Show resolved
Hide resolved
- Added modern message style - Improved support for message components - Added tests for the new styles - Added support for components with classic message body
The main PR comment has been updated to better reflect the changes from the last commit |
Weird, the tests passed locally, and the components ones should pass, I made the internal server return that the webhook is application owned |
Why is DryTest running, it should have been ignored |
this should fix it |
There was a problem hiding this 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?
@JvmField | ||
@Suppress("MemberVisibilityCanBePrivate") | ||
protected val style: MessageStyle = MessageStyle() |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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
@Suppress("MemberVisibilityCanBePrivate") | ||
class MessageStyle internal constructor() : java.io.Serializable { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Epic, thanks.
Classic message body
Modern message body