The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Discord Notification Webhook
I've written a gapp script that polls a dedicated gmail account for new thread/post notifications which it then sends to Discord via webhook. Unfortunately it's not overly reliable (but better than RSS) and I've been looking at using curl to hook in at newpost_complete to send a webhook post and cut out the gmail/grscript middle man completely.
It doesn't seem to work at all. I know that curl is working on the server from a couple of tests outside of vbulletin. Anyone else have anything like this working? Test plugin, no joy, no error messages: Code:
$url = "https://mywebhookurl"; $data = array("content" => $message, "username" => "Webhooks"); $curl = curl_init($url); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); return curl_exec($curl); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|