-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
clean_content incorrectly replaces references with markdown codeblocks, escapes #9834
Comments
A note - it seems to me that there are several potentially desired transforms here, that are very tricky to get right: Raw message to "clean message", where one is viewing roughly what they'd see on discord: The inverse, clean message to raw message by looking up references (e.g. what the discord input textbox is doing in the client): Escaping reference syntax in a string that should be literal: Escaping markdown in a string that should be literal, and its inverse. (Example omitted, github markdown makes this a nightmare) ... and potentially doing something about emoji references and other types here: https://discord.com/developers/docs/reference#message-formatting But |
I Would like to Work on this |
Summary
The discord client will show e.g. `<@123456789012345>` literally, but clean_content will replace it. Similarly for \<@123...> where the escape renders it literally.
Reproduction Steps
Pass messages with various forms through clean_content and observe the official client treating them as literals:
Minimal Reproducible Code
No response
Expected Results
References that do not parse in the client should not be parsed here
Actual Results
They are
Intents
message_content, members
System Information
Checklist
Additional Context
Worth noting, clean_contents is bizarre to begin with. It "prettifies" references, but also tries to escape things? See also #1911
The text was updated successfully, but these errors were encountered: