Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Discord web hook embed color?

Asked by 6 years ago

So I have this code right now to send an embed:

local url = "myurl"
local message = {
    username="Raffle win bot",
    embeds={{
        fields={
            {value="text",name="text"},
            {value="text",name="text"}},
            title="text",description="text"}}}
data = game:GetService('HttpService'):JSONEncode(message)
game:GetService('HttpService'):PostAsync(url, data, Enum.HttpContentType.ApplicationJson)

is there any way to make this like green instead of grey?

0
fixed creeperhunter76 554 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Discord embeds support colors with the color key. If you want the color 0xFF00 (Lime green), you'll have to do

local url = "myurl"
local message = {
    username="Raffle win bot",
    embeds={{
    color = 0xFF00 -- or you can use the decimal representation, 65280
        fields={
            {value="text",name="text"},
            {value="text",name="text"}},
            title="text",description="text"}}}
data = game:GetService('HttpService'):JSONEncode(message)
game:GetService('HttpService'):PostAsync(url, data, Enum.HttpContentType.ApplicationJson)

0
not working for me. I just get this: http://prntscr.com/idwik0 DanielDeJong3 158 — 6y
0
oh, sorry. the color has to be inside the embed creeperhunter76 554 — 6y
0
Thanks!! :)) DanielDeJong3 158 — 6y
Ad

Answer this question