Hello, I’m trying to send a Discord webhook whenever a player touches a brick. I have been testing it out so far.
I designed my webhook using an online webhook creator and have basically taken the JSON from that. I’m looking to translate it into a LUA compatible string of text that can be encoded and sent off but I am having trouble with the JSON [] character. I’m not really sure what that would ‘translate’ too?
local data = {
embeds = [
{
description = "PureGamerGames was caught in the helicopter area...",
color = 16561212,
author = {
name = "Helicopters",
icon_url = "https://media.discordapp.net/attachments/542426219287805953/718917497578848286/unnamed.png?width=678&height=678"
},
footer = {
text = "SCRP • Logs for moderation purposes only"
},
thumbnail = {
url = "https://media.discordapp.net/attachments/354983300114415617/720329691839332442/warning_symbol_in_orange.png"
}
}
],
avatar_url = "https://media.discordapp.net/attachments/542426219287805953/718917497578848286/unnamed.png?width=678&height=678"
}
^ Currently what I have done. Roblox isn’t liking the ‘[’
{
"embeds": [
{
"description": "PureGamerGames was caught in the helicopter area...",
"color": 16561212,
"author": {
"name": "Helicopters",
"icon_url": "https://media.discordapp.net/attachments/542426219287805953/718917497578848286/unnamed.png?width=678&height=678"
},
"footer": {
"text": "SCRP • Logs for moderation purposes only"
},
"thumbnail": {
"url": "https://media.discordapp.net/attachments/354983300114415617/720329691839332442/warning_symbol_in_orange.png"
}
}
],
"avatar_url": "https://media.discordapp.net/attachments/542426219287805953/718917497578848286/unnamed.png?width=678&height=678"
}
^The JSON
How could I fix the already translated JSON to work? I can’t just keep it as JSON because I need to dynamically change some of the text to suit player details.
Thank you!