• Discord webhook ban logs
    7 replies, posted
Hey so, I want a webhook that sends a message in a discord channel. when a player is banned. Right now I have this, inside the ulx ban command. http.Post( "my webhook url that i removed", { content = "Done!" } ) But it doesn't work. No errors, just doesnt send a message. Any help?
Cloudflare blocks HTTP requests originating from Gmod. Proxy your webhooks through your own server first
Just to correct this, it's specifically Discord using Cloudflares' firewall that blocks this. Cloudflare alone isn't doing anything.
yeah some idiot spammed discords api from gmod and now they block the user agent from gmod
I was wondering myself why I couldn't send logs to my Discord. What you can do, though, if you know how to write an API: Write a backend that accepts a POST request from Garry's Mod and then forwards that request to your Discord webhook.
Basically to use webhooks from gmod, you're going to either need to either post to a php page that will then post to discord for you or use luasocket
I doesn't HAVE to be PHP, you can use any serverside language.
I wrote here a basic script that will proxy your webhook requests: HTTP request failed, Cloudflare error, cookies disabled?
Sorry, you need to Log In to post a reply to this thread.