Access Parsed Message
Many bots implement some kind of message parser. This is required to do things like identify prefixes, as well as parse message contents, usually for mentions.
Parsing message contents is rather hard, especially because ideally, a message parser should also parse Discord-flavored markdown, which is not a common markdown variant.
It would be nice if the API returned the parsed contents of messages, so that bots didn't need to implement ad-hoc parsers.
Some examples:
foo # [{type: text, contents: "foo"}]
`foo` # [{type: code, contents: "foo"}]
foo `bar` [{type: text, contents: "foo "}, {type: code, contents: "bar"}]
<@!1234> [{type: user_mention, contents: "1234"}]
The above representation could definitely use some work, but hopefully it illustrates the idea.
0
Please sign in to leave a comment.
Comments
0 comments