help with c#
im trying to write this script that sends a message to a webhook onclick, but it isnt working help would be appreciated
23 Replies
Define "doesn't work"
im getting 400 bad request and the detailed errors in console arent working
also getting this
Use the debugger to see what actual data you're sending
how do i do that?
Then try sending it with, say, Bruno or something
$debug
Tutorial: Debug C# code and inspect data - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
alr thanks
Might be a little more involved for Unity, not 100% sure
Yeah, you're gonna have to look up how to use the debugger with Unity
alrighty!
since this is a mapping thing i cant really put unity into play mode to debug it
Skip that step, then, and try sending the same message with Bruno or whatever other client
Or even with a simple C# console app
See if that works
ive sent it with an external tool]
the webhook works fine
ill try with bruno though'
Nah, what you use doesn't really matter
ah okay
if the webhook works fine could it be my json payload
Could be, yeah
im sure discord uses application/json
That much is a given, yeah
looking at my code can you see anything that could cause it?
new StringContent
seems sus, could be creating a text
payload
There's a JsonContent
classhm alr ill change it
i think ima take a break for now and come back to it