admin管理员组

文章数量:1318582

Is there a way to change the color of text for certain sections of a discord.js embed?

  .setColor('#0099ff')
    .setTitle('~__Command Hewp__~')
  .addFields(
    { name: `**${prefix + 'help'}**`, value: `Usage: ${prefix + 'help'}` },
    { name: `${prefix + 'purge'}`, value: `Usage: ${prefix + 'purge'} <# of Messages, max 100>` },
    { name: `${prefix + 'kick'}`, value: `Usage: ${prefix + 'kick'} <target user>` },
    { name: `${prefix + 'ban'}`, value: `Usage: ${prefix + 'ban'} <target user>` },
     );
     message.channel.send(help)```

Is there a way to change the color of text for certain sections of a discord.js embed?

  .setColor('#0099ff')
    .setTitle('~__Command Hewp__~')
  .addFields(
    { name: `**${prefix + 'help'}**`, value: `Usage: ${prefix + 'help'}` },
    { name: `${prefix + 'purge'}`, value: `Usage: ${prefix + 'purge'} <# of Messages, max 100>` },
    { name: `${prefix + 'kick'}`, value: `Usage: ${prefix + 'kick'} <target user>` },
    { name: `${prefix + 'ban'}`, value: `Usage: ${prefix + 'ban'} <target user>` },
     );
     message.channel.send(help)```
Share Improve this question asked Mar 17, 2020 at 6:34 YeetLord591YeetLord591 411 gold badge1 silver badge3 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 1

Unfortunately, Discord does not support changing the color of text. The only option is to use code blocks in field.value, but it doesn't look very good.

You can change the color of the response text message by formatting it in certain ways.

Here's the detailed breakdown of the formats

```arm
Orange
```

```fix
Yellow
```

```yaml
Cyan
```

```md
# Blue
```

```diff
- This is red
```

```
Grey
```

Remember to use - to start the text in diff and # for md

本文标签: javascriptChange Color on discordjs embed textStack Overflow