My goal is to partly color a text. I know I can use .sendCode("css","this is my message");
which we'll make my text yellow but I don't want my whole text to be yellow.
Perhaps I could create another .css file and then call it from my JavaScript file but as I am inexperienced with JavaScript I would like some help with it. I think that's the fastest way to do it.
Discord doesn't allow colored text. Though, currently, you have two options to "mimic" colored text.
Discord supports Markdown and uses highlight.js to highlight code-blocks.
Some programming languages have specific color outputs from highlight.js and can be used to mimic colored output.
To use code-blocks, send a normal message in this format (Which follows Markdown's standard format).
```language
message
```
Languages that currently reproduce nice colors: prolog (red/orange), css (yellow).
Discord now supports Embeds and Webhooks, which can be used to display colored blocks, they also support markdown. For documentation on how to use Embeds, please read your lib's documentation.