How do I post an HTTP embed?

I want an embed with information being displayed (Game URL, Username, UserID, Admin Command used).

I’m actually not sure how to do that, I’ve only made a webhook which sends a message, not embed, to the specific webhook.

I’ve tried looking for it, but yet sorting by relevance on the DevForum doesn’t really do much.

This code is inside the ModuleScript named ‘MainModule’ inside the Basic Admin Essentials Loader.

Current code being used
local function onChatted(Message, Player)
	local Command = getCommand(Message,Player)
	if not Command then return end
	local Arguments = {}
	table.insert(Arguments, Player)
	for Segment in string.gmatch(Command, "%S+") do
		if not Arguments[2] then
			table.insert(Arguments,Segment:lower())
		else
			table.insert(Arguments,Segment)
		end
	end
	if Arguments[2] ~= nil then
		for a,b in next,Commands do
			local tempPerm = returnPermission(Player)
			if b[1]:lower() == Arguments[2]:lower() and tempPerm >= b[4] then
				if (tempPerm == 0 and b[4] == 0 and not sysTable.publicCommands) and b[3] ~= Funcs.Donor  then
					return
				end
				local Success,errorMessage = pcall(function()
					b[3](Arguments)
				end)
				if errorMessage then
					addLog(sysTable.debugLogs,'"'..Arguments[2]..'"| Error: '..errorMessage)
					essentialsEvent:FireClient(Player,'Message','Function Error','Name: "'..Arguments[2]..'"\n'..errorMessage)
				elseif Success then
					local cleanedMessage

					local Cleaned,newData = cleanUserData(Message,Player,false)
					if Cleaned and newData then
						cleanedMessage = newData
					elseif not Cleaned then
						cleanedMessage = newData
					end

					local webhook = "removedbyauthor"
					local http = game:GetService("HttpService")
					local Data = http:JSONEncode({
						["username"] = "FBI | Admin Logger";
						["content"] = string.gsub("# New log\n\nGame: ".."https://www.roblox.com/games/"..game.PlaceId.." \n**Username:** "..Player.Name.."\n**UserID:** "..Player.UserId.."\n**Command:** "..Message, "@", "(@)");
					})
				local function PostHttpMessage()
					task.wait(1)
					http:PostAsync(webhook,Data)
				end


				if Command == "cmds" or Command == "rejoin" or Command == "getadmin" or Command == "clean" or Command == "changelog" then
					continue
				else
						task.delay(1,PostHttpMessage)
				end

					if cleanedMessage then
						pluginEvent:Fire("Admin Logs",{Player,newData})
					else
						addLog(sysTable.Logs,{Sender = Player,Bypass = true,Data = '(super safechat) executed "'..tostring(b[1] or "???")..'"',Tag = true})
						return
					end

					addLog(sysTable.Logs,{Sender = Player,Data = cleanedMessage}) 
				end
				return
			end
		end
	end
end

Any help is welcomed, all I need to know is the basic information to send an embed.

1 Like

Hello! I work a lot with basic admin and would help you if you want to add me on discord(BodieBlox)!

1 Like

I sent the friend request on Discord.

(For the HTTP request)

(For the documentation on what an embed requires/uses)


@Jerold09362 If BeachScript helps you, make sure to post the solution here so others can be helped as well

1 Like

New replies are still welcomed.