https://github.com/AliErenKAYA-Dev/ghost-discord-api
npm i
2- After opening the index.js file, you need to enter the webhook URL you created on Discord in the section below:
const Hook = new webhook.Webhook("YOUR WEBHOOK URL") // Example: https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN
const rssUrl = "https://www.siteurl.com/rss"; // Example: https://www.ise.town/rss
const defaultImg = 'default img url'; // Example: https://www.ise.town/content/images/2023/04/town.png
const timeOut = 20000;
const msg = new webhook.MessageBuilder() .setName('Webhook Name') // Your webhook name .setColor('#f1e05a') // Message color .setTitle(newEntries[0].title) // Message Title .addField('', newEntries[0].contentSnippet.substring(0, 120) + "...") // We adding new field for short content .setFooter("Author: " + newEntries[0].creator + " - Release Time: " + formattedDate + " " + formattedTime) // Setting footer .setImage(imgSrc) // Image url .setURL(newEntries[0].link); // Post url Hook.send(msg); // We sending a message
node index.js