kord
kord copied to clipboard
Add contentDisplay and contentStripped to Message
JDA has this functionality, and it has been requested
Right now I can think a few things that could be probelmatic with this implementation:
Message.contentDisplay()will always replace mentions etc. even if they are escaped by\or inside a code blockMessge.contentDisplay()does not handle spoiler tags or timestampsString.parseMarkdown()will not recognize spoiler tags, mentions etc. and therefore cannot escape or strip them (tough I'm not sure if it would be desired behavior)
Message.contentDisplay() will always replace mentions etc. even if they are escaped by \ or inside a code block
Are you sure that those mentions will appear in message.mentionedUsers if they're escaped?
Message.contentDisplay() will always replace mentions etc. even if they are escaped by \ or inside a code block
Are you sure that those mentions will appear in message.mentionedUsers if they're escaped?
Oh, you've got a point there, didn't think about that. Probably not. But it still seems to be a problem with emotes.
Problem with spoilers is, that | isn't a valid markdown token and changing the lexer is hard outside the markdown parser itself
I still can't figure out if this should be in the library or could be some sort of separate thing
JDA had a similar utility and we cannot make it a lazy property of Message from another module
./gradlew apiDump is missing :)
./gradlew apiDumpis missing :)
Dang keep forgetting that :)