`client.on("presenceUpdate", (oldPresence, newPresence) => {
if (!newPresence.activities) return false;
newPresence.activities.forEach(activity => {
if (activity.type == "STREAMING") {
console.log(`${newPresence.user.tag} is streaming at ${activity.url}.`);
const twitchAnnouncementChannel = newPresence.guild.channels.cache.find(ch => ch.id === `789277245617209354`)
const twitchChannel = new Discord.MessageEmbed()
.setColor("#400080")
.setTitle(`${newPresence.user.tag} is now live on twitch`)
.setURL(activity.url)
.setDescription(`**Stream Started**`)
.setImage(activity.url)
.setTimestamp()
.setFooter("Enigma")
twitchAnnouncementChannel.send(`${newPresence.user.tag} IS NOW LIVE ON TWITCH GO CHECK HIM OUT! @everyone`, twitchChannel)
};
});
});`
I have this code to notify my server that someone is live streaming. When I set the image to the stream url it just doesn’t load it for some reason. Is there a diferent way to get the image of the livestream?
