• Resolved eyeofthenyte

    (@eyeofthenyte)


    I will preface that I am very new to much of this and have done quite a bit of searching.
    Perhaps I’m just goofing something small up or a bunch of small things all at once.

    I am attempting to add a function to the functions.php file for pushing data to a Discord embed. I’ve gotten things with IFTTT to work using webhook.site and I can see the data from the standard webhook output as well. I named the webhook itself discord-blog-announcement.

    I feel like I’m close but so far away. Any suggestions?

    
    function discord-blog-announcement($post){
    	"content": "Message Here",
      	"embeds": [
        	{
          	"title": "$post['post_title']",
          	"description": "$post['post_excerpt']",
          	"url": "$post[post_permalink]",
          	"color": 5814783,
          	"timestamp": "$post['post_date']",
          	"image": {
            	"url": "$post['post_thumbnailurl']"
          		},
          	"thumbnail": {
            	"url": "$post['post_thumbnailurl']"
          		}
        	}
      	]
    }
    add_action( 'init', 'discord-blog-announcement')
    
Viewing 1 replies (of 1 total)
  • Thread Starter eyeofthenyte

    (@eyeofthenyte)

    Well, It definitely looks like I merged some things and didn’t quite go far enough in other places. I ended up finding some more info and things are working now.

Viewing 1 replies (of 1 total)
  • The topic ‘Functions Addition’ is closed to new replies.