How can I make a Report Webhook?

How can I make a report GUI?

There is going to be a textbox which you put the report in, when you click send button it will send it to a discord webhook under the reporters name, preferably an embed.

2 Likes

Make a post request to the webhook url with a JSON encoded dictionary of all the message parameters you want

local HttpService = game:GetService'HttpService'

local data = {
	content = "message content",
	username = "webhook username",
	embeds = {
		{
			title = "embed title",
			description = "embed description",
			color = 0xff00ff,
			fields = {
				{
					name = "field 1",
					value = "field text 1"
				},
				{
					name = "field 2",
					value = "field text 2"
				},
				{
					name = "inline field 1",
					value = "inline field text 1",
					inline = true
				},
				{
					name = "inline field 2",
					value = "inline field text 2",
					inline = true
				}
			}
		}
	}
}

local url = "https://discord.com/api/webhooks/*******/****************"
HttpService:PostAsync(url, HttpService:JSONEncode(data))

2 Likes

[Search] [Before] [Posting]

2 Likes

You have to program it with Lua. You can find out how to program in Lua from the Developer Hub: DevHub | Roblox

The technologies you’ll need to use for this are:

Search before posting, This will topic help you.

I am pretty sure it is

local HttpService = game:GetService('HttpService')

It works either way, you don’t need parentheses if you’re just passing 1 argument that’s a string