I’m trying to implement a discord logging system for moderation actions in my game. I’ve got everything working, except for the avatar’s thumbnail showing up.
Code
local function SendDiscordMessage(title, desc, username, reason, userid)
local data = {
["embeds"] = {{
["title"] = title,
["description"] = desc,
["thumbnail"] = {url = string.format("https://www.roblox.com/bust-thumbnail/image?userId=%d&width=420&height=420&format=png", userid)},
["fields"] = {
{
["name"] = "Username",
["value"] = username,
["inline"] = true
},
{
["name"] = "Reason",
["value"] = reason,
["inline"] = true
}
}
}}
}
local data = HttpService:JSONEncode(data)
local success,errorm = pcall(function()
HttpService:PostAsync(url, data)
end)
if not success then print(errorm) end
end