【发布时间】:2020-12-23 17:26:40
【问题描述】:
我在我的嵌入中使用十进制颜色 6275760,但我希望他也使用 16777201,当他发送嵌入时,他使用这两种颜色之一发送它
if (!args.length)
return message.channel.send({
embed: {
color: 6275760,
description: `<:FubukiX:749212433951883264> | ${message.author}, You need to put a message.`,
footer: {
text: ` | Exemple: !say hello`,
},
},
});
【问题讨论】:
-
color: Math.random() < 0.5 ? 6275760 : 16777201, -
只是一个旁注,我会高度建议将这些数字放在十六进制中。
color: 0x5fc2b0作为 RGB 值比十进制等效值更容易理解。
标签: javascript node.js discord.js bots