Jump to content

Discord Webhook


arciCZ

Recommended Posts

Hello, i need help i now trying to make Discord Webhook Embeds, but when i do it i only get response code 400 and Response data: " {"embeds": ["0"]} "

sendOptions={
		formFields = {
			embeds = {
				title = "Hi",
				description = " S6066 authored & committed",
				fields={
					{name="1",value="2"},
					{name="3",value="4"}
				},
				footer = {
					text = "Woah! So cool! :smirk:",
					icon_url = "https://i.imgur.com/fKL31aD.jpg"
				}
			}
		}
	}
	fetchRemote(Webhook1URL, sendOptions,callback)

 

And Response with Iprint is

--Response Data:
{"embeds": ["0"]}

--Errno
{
	headers = {
		["Alt-Svc"] = "clear",
		["CF-Cache-Status"] = "DYNAMIC",
		["CF-RAY"] = "53535a16ba733e0c-PRG",
		Connection = "keep-alive",
		["Content-Length"] = "17",
		["Content-Type"] = "application/json",
		Date = "Wed, 13 Nov 2019 20:03:56 GMT",
		["Expect-CT"] = 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
		Server = "cloudflare",
		["Set-Cookie"] = "__cfduid=da477b12fac9e577fb9c4965f1d100e001573675436; expires=Thu, 12-Nov-20 20:03:56 GMT; path=/; domain=.discordapp.com; HttpOnly",
		["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains",
		Via = "1.1 google",
		["X-RateLimit-Bucket"] = "3cd1f278bd0ecaf11e0d2391374c011d",
		["X-RateLimit-Limit"] = "5",
		["X-RateLimit-Remaining"] = "4",
		["X-RateLimit-Reset"] = "1573675439",
		["X-RateLimit-Reset-After"] = "2"
	},
	statusCode = 400,
	success = false
}

 

Link to post

Well, in "embeds" you can embed more than one embed, so you have to put it on another table (table per embed)


embeds = {
	{	-- This is embed number 1
	  title = "Hi",
	  description = " S6066 authored & committed",
	  fields={
		  {name="1",value="2"},
		  {name="3",value="4"}
		},
	  footer = {
		  text = "Woah! So cool! :smirk:",
		  icon_url = "https://i.imgur.com/fKL31aD.jpg"
		}
	}
}

 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...