Issue
const allowed = body.data.children.filter((post: {
data: {
over_18: any;
};
}) => !post.data.over_18);
if (!allowed.length) return message.channel.send('It seems we are out of fresh memes!, Try again later.');
const randomnumber = Math.floor(Math.random() * allowed.length)
const embed = new MessageEmbed()
.setTitle(allowed[randomnumber].data.title)
return embed
Information: I'm using Discordjs 13 with typescript and I want to make the title a hyperlink that when you click on the text it takes you to the post. when I do :
.setTitle(`[${allowed[randomnumber].data.title}](https://reddit.com${allowed[randomnumber].data.permalink})`)
It shows error this function is not callable Thank you in advance.
Solution
Solved!, i had to use .setUrl('')
Answered By - knify
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.