ErickSkrauch
ErickSkrauch
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
I thought maybe there is some already existing solution that I'm missing, but it seems that there is no such solution :(
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
Thats why I created this topic, because for me it seems like this library (@discordjs/formatters to be precise) must provide a way to extract plain text from the message.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
So there should be a way :)
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
But Discord does that.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
So they should be treated as part of the input and doesn't stripped.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
x**x is still contains those asterisks and they doesn't rendered as bold text.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
It escapes it quite straightforward.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
As I mentioned, it's way more complex than simple "find double asterisk and remove it". That is the problem (
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
It will escape markup, but do not remove it.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
Unfortunatelly, it doesn't remove markup.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
Yep. When you send a message with such formatting, bot receives plain markdown: **this?**. But I need to strip somehow all those asterisks, underlines, etc., and obtain the plain text. I saw some libraries that utilize marked library in order to format text and extract plain from built HTML, but they doesn't support the whole markdown, available on Discord.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
Yea, I know. But since Discord has a pretty powerful markdown formatting system, it seems like there should be a way in the Discord.js library itself to get the plain text, since nobody but the library would know exactly how to render that markdown to get the final text.
35 replies
DIAdiscord.js - Imagine an app
Created by ErickSkrauch on 4/15/2024 in #djs-questions
How to get clean text without markdown markup?
I have already explained all the necessary details.
35 replies