Please or Register to create posts and topics.

Telegram event notifications

PreviousPage 2 of 2
Quote from DirkB on December 27, 2020, 5:33 pm
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

Great idea! I think to develop such a solution in the future

Quote from djo on January 28, 2021, 11:42 am
Quote from DirkB on December 27, 2020, 5:33 pm
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 192.168.1.1.

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

Great idea! I think to develop such a solution in the future

Happy to see your thread as it is, just what I’ve been looking for and excited to read all the posts from you.

Still accepting payments through Telegram? Atlanta Engagement & Couples Photographer

attorney at law near me

This is really great and wonderful! I like it a lot! Thank you so much! https://www.concretecontractorscincinnati.com

Hi, @djo
Is it possible to have multiple bots each sending a different sub-forum notification?
Example: 
Subforum about hardware, a bot01 sends to the telegram100 group. 
Subforum about software, a bot02 sends to the telegram200 group.

Greetings

Hello, now this is not implemented in the plugin

Quote from DirkB on December 27, 2020, 5:33 pm
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

Good afternoon! If I have free time, I will try to apply your solution in the WordPress plugin

Quote from djo on March 10, 2022, 7:09 am

Hello, now this is not implemented in the plugin

Hi, @djo.
Do you have any plans to implement this function?

I'm very interested in acquiring your solution, but that's the only way it would be interesting for me.

Greetings.
PreviousPage 2 of 2