Please or Register to create posts and topics.

Telegram event notifications

12

I am Isabella Ava. I am an author. I write blogs about sports, celebrities, events ETC. I also work as a link builder. And I also use the social media platform to get website traffic like Facebook, Instagram, Linkedin, and others. If you are searching for coupon site click here vitalchoice com

Quote from djo on May 13, 2019, 8:32 pm

A small addition to the popular form that will allow you to quickly receive notifications to your Telegram about the activity on your Forum site.

If you want, you can buy it for a small fee.

https://coderun.ru/product/asgaros-forum-wordpress-uvedomleniya-o-sobytiyakh-v-telegram/

Hi, I'm looking for a solution to to the same for Discord using a Discord webhook

Anything planned?
I only found a working solution for posts, but would be nice to have it for the forum too:

<?PHP
function discordmsg($msg, $webhook) {
  if($webhook != "") {
    $ch = curl_init($webhook);
    $msg = "payload_json=" . urlencode(json_encode($msg))."";
    
    if(isset($ch)) {
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
      curl_setopt($ch, CURLOPT_POSTFIELDS, $msg);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      $result = curl_exec($ch);
      curl_close($ch);
      return $result;
    }
  }
}
?>
//The next part is the actual action and message you wish to send.

<?PHP
// URL FROM DISCORD WEBHOOK SETUP
$webhook = "https://discordapp.com/api/webhooks/xxxxxxxxx/xxxxxxxx"; 
$msg = json_decode('
{
    "username":"BOTNAME",
    "content":"The message the BOTNAME posts.",
    "embeds": [{
        "title":"The Link Title",
        "description":"The Link Description",
        "url":"https://www.thelinkurl.com/",
        "color":DECIMALCOLORCODE,
        "author":{
            "name":"Site Name",
            "url":"https://www.sitelink.com/",
            "icon_url":"URLTOIMG"
        },
        "fields":[
            {
                "name":"LISTITEM1",
                "value":"LISTVALUE1",
                "inline":true
            },
            {
                "name":"LISTITEM2",
                "value":"LISTVALUE2",
                "inline":true
            },
            {
                "name":"LISTITEM3",
                "value":"LISTVALUE3",
                "inline":true
            }]
    }]
}
', true);
 ?>
//Lastly there's the call to fire the script.

<?PHP
discordmsg($msg, $webhook); // SENDS MESSAGE TO DISCORD
?>

 

Thanks a lot

logo design usa

Thanks will check the notification besides visit SEO for interior designers for any sort of help regarding SEO.

12