HTTP 400 (Bad Request)

I have tried manipulating embeds, for my admin panel. Unfortunately, it keeps appearing as “bad request” each time I fire the event, if you could help that would be really helpful. I have the settings enabled where it lets you use remote events, http service.

Serverscript:

local httpservice = game:GetService("HttpService")
local devAnn = "ariana webhook ehre"
local sessionAnn = "skinny queen "
local staffywaffy = "ariana grande lol"
local month = os.date("%B")
local icon


if month == "January" then
	icon = "rbxassetid://6100698914"


elseif month == "Feburary" then
	icon = "rbxassetid://7015835641"



elseif month == "March" then
	icon = "rbxassetid://6100698914"



elseif month == "April" then
	icon = "rbxassetid://7015835641"


elseif month == "May" then
	icon = "rbxassetid://6100698914"


elseif month == "June" then
	icon = "rbxassetid://7015835641"


elseif month == "July" then
	icon = "rbxassetid://6100698914"


elseif month == "August" then
	icon = "rbxassetid://7015835641"


elseif month == "September" then
	icon = "rbxassetid://6100698914"


elseif month == "October" then
	icon = "rbxassetid://7015835641"


elseif month == "November" then
	icon = "rbxassetid://6100698914"


elseif month == "December" then
	icon = "rbxassetid://7015835641"

end

game.ReplicatedStorage.Administrative.AReciever.OnServerEvent:Connect(function(plr,text)
	local FilteredMessage = game:GetService("Chat"):FilterStringForBroadcast(text,plr)
	if plr:GetRankInGroup(9178694) >= 10 then
		game.ReplicatedStorage.Administrative:WaitForChild("AReciever").receiver2:FireAllClients(plr,FilteredMessage)
	else
		warn("This doesnt work with your rank." .. plr.Name)
	end
end)

game.ReplicatedStorage:WaitForChild("Administrative").AReciever.receiver2.OnServerEvent:Connect(function(plr,baka)
	if plr:GetRankInGroup(9178694) >= 10 then






		if baka == "build" then
			local Message = {
				["embeds"] = {
					["title"] = "Whippe Announcements",
					["image"] = icon,
					["description"] = "Looks like we've aheard issues, thanks to " .. plr.Name .. ", for this notice. We have contacted developers, please do not worry about this.",
					["colour"] = 0xEAA1B6
				}
			}
			Message = httpservice:JSONEncode(Message)
			httpservice:PostAsync(devAnn, Message)
			print("announced")






		elseif baka == "callStaff" then
			local Message = {
				["avatar_url"] = icon,
				["context"] = "Hiya, darlings. A SHR has called you in for a meeting at the parlour. " .. plr.Name .. " will be the host of this meeting. Who also made this announcement appear, lol",
			}
			Message = httpservice:JSONEncode(Message)
			httpservice:PostAsync(staffywaffy, Message)
			print("announced")







		elseif baka == "datastore" then
			local Message = {
				["context"] = "Hiya, zarlings! Appears that we have datastore issues via ROBLOX, if you are scared of loosing data please refrain from joining games, will let you know when they are back, thanks to " .. plr.Name .. " for this notice.",

			}
			Message = httpservice:JSONEncode(Message)
			httpservice:PostAsync(devAnn, Message)
			print("announced")
		end
	end
end)

Local script, where it fires the remote:

local plr = game.Players.LocalPlayer
local status = true
local statusext = true



for i, v in pairs(script.Parent:GetChildren()) do
	if v:IsA("Frame") then
		if v.Name == "serverann" or v.Name == "training" then
			for _,button in pairs(v:GetChildren()) do	
				if button:IsA("TextButton") and button.Name ~= "TextButton" then
					button.MouseButton1Click:Connect(function()
						if statusext == true then
							game.ReplicatedStorage.Administrative.AReciever.receiver2:FireServer(button.Name)
							statusext = false
							wait(15)
							statusext = true
						else
							print("owo, uh cooldown babe")
						end
					end)
				end
			end
		end
	end
end
1 Like

You need different proxy, please search before posting.

Is this an embed for Discord? if so, then change context to content. If you need further assistance then I am willing to help. This article may assist you if you get stuck.

I have researched about embeds, although I’m a newer scripter nor do I know a lot about API’s and functions although I try my best. If i found something beforehand I would’ve posted, but I didn’t. It would also help if you provided an article and not just straight forward.

Trying that now, thank you for the suggestion

Edit: No luck, I’ve used this method before and had no issues w it, not sure what happened although will read that article.

Whereabouts in the script does it error? Can you pin-point the function for me?

image

Datastore embed posted,

Before ["embeds"] put ["content"] = "",, see if that does the trick.

1 Like

Alright, testing that now! Will update you

worked, although re-scripted the whole embed system lol,

image

local month = os.date("%B")
local icon
local discordicon

if month == "January" then
	icon = "rbxassetid://6100698914"
	discordicon = ""

elseif month == "Feburary" then
	icon = "rbxassetid://7015835641"



elseif month == "March" then
	icon = "rbxassetid://6100698914"



elseif month == "April" then
	icon = "rbxassetid://7015835641"


elseif month == "May" then
	icon = "rbxassetid://6100698914"


elseif month == "June" then
	icon = "rbxassetid://7015835641"


elseif month == "July" then
	icon = "rbxassetid://6100698914"


elseif month == "August" then
	icon = "rbxassetid://7015835641"


elseif month == "September" then
	icon = "rbxassetid://6100698914"


elseif month == "October" then
	icon = "rbxassetid://7015835641"


elseif month == "November" then
	icon = "rbxassetid://6100698914"


elseif month == "December" then
	icon = "rbxassetid://7015835641"

end

game.ReplicatedStorage.Administrative.AReciever.OnServerEvent:Connect(function(plr,text)
	local FilteredMessage = game:GetService("Chat"):FilterStringForBroadcast(text,plr)
	if plr:GetRankInGroup(9178694) >= 10 then
		game.ReplicatedStorage.Administrative:WaitForChild("AReciever").receiver2:FireAllClients(plr,FilteredMessage)
	else
		warn("This doesnt work with your rank." .. plr.Name)
	end
end)

game.ReplicatedStorage:WaitForChild("Administrative").AReciever.receiver2.OnServerEvent:Connect(function(plr,baka)
	if plr:GetRankInGroup(9178694) >= 10 then






		if baka == "build" then
			local Message = {
				["content"] = "",
				["username"] = plr.Name,
				["avatar_url"] = "https://www.roblox.com/headshot-thumbnail/image?userId=".. plr.UserId .. "&width=420&height=420&format=png",
				["embeds"] = {{

					["title"] = "IMPORTANT ANNOUNCEMENT",
					["description"] = plr.Name .. " has informated us about the recent building issues, please refrain from reporting this in bug reports, thank you.",
					["url"] = "https://www.roblox.com/games/6417127983/Whipp-V1-BETA",
					["type"] = "rich",
					["thumbnail"] = {
						["url"] = "https://t3.rbxcdn.com/b3f87bd7c8198f43bced56a3e3aba1e6" -- whippe icon
					},
					["footer"] = {
						["icon_url"] = "https://tr.rbxcdn.com/dceb79ba4c2da9d84830021c503249f2/150/150/AvatarHeadshot/Png", -- sammy icon lol
						["text"] = "Alerted announcement, created by saouvs",					
					}
				}}
			}

			local Message = httpservice:JSONEncode(Message)
			httpservice:PostAsync(devAnn, Message)






		elseif baka == "callStaff" then
			local Message = {
				["content"] = "",
				["username"] = plr.Name,
				["avatar_url"] = "https://www.roblox.com/headshot-thumbnail/image?userId=".. plr.UserId .. "&width=420&height=420&format=png",
				["embeds"] = {{

					["title"] = "IMPORTANT ANNOUNCEMENT",
					["description"] = plr.Name .. " has called a staff meeting, please attend if you can thank you!",
					["url"] = "https://www.roblox.com/games/6417127983/Whipp-V1-BETA",
					["type"] = "rich",
					["thumbnail"] = {
						["url"] = "https://t3.rbxcdn.com/b3f87bd7c8198f43bced56a3e3aba1e6" -- whippe icon
					},
					["footer"] = {
						["icon_url"] = "https://tr.rbxcdn.com/dceb79ba4c2da9d84830021c503249f2/150/150/AvatarHeadshot/Png", -- sammy icon lol
						["text"] = "Alerted announcement, created by saouvs",					
					}
				}}
			}
			Message = httpservice:JSONEncode(Message)
			httpservice:PostAsync(staffywaffy, Message)







		elseif baka == "datastore" then
			local Message = {
				["content"] = "",
				["username"] = plr.Name,
				["avatar_url"] = "https://www.roblox.com/headshot-thumbnail/image?userId=".. plr.UserId .. "&width=420&height=420&format=png",
				["embeds"] = {{

					["title"] = "IMPORTANT ANNOUNCEMENT",
					["description"] = plr.Name .. " has reported datastore issues, if you are scared of loosing data please refrain from joining **ANY** roblox game.",
					["url"] = "https://www.roblox.com/games/6417127983/Whipp-V1-BETA",
					["type"] = "rich",
					["thumbnail"] = {
						["url"] = "https://t3.rbxcdn.com/b3f87bd7c8198f43bced56a3e3aba1e6" -- whippe icon
					},
					["footer"] = {
						["icon_url"] = "https://tr.rbxcdn.com/dceb79ba4c2da9d84830021c503249f2/150/150/AvatarHeadshot/Png", -- sammy icon lol
						["text"] = "Alerted announcement, created by saouvs",					
					}
				}}
			}
			Message = httpservice:JSONEncode(Message)
			httpservice:PostAsync(devAnn, Message)
		end
	end
end)

Wonderful, glad I could help! :]

1 Like