Skip to content

Commit

Permalink
add embed tree
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-ayf committed Aug 18, 2021
1 parent 0f9cc19 commit e503680
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ client.on('message', msg => {
let attach = target.attachments.find(att => att.width);
if (attach) msgembed.setImage(attach.url);
let embeds = target.embeds;
if (embeds.length) msgembed.description += '\n(Original message was embedded.)';
if (embeds.length) msgembed.description += `\n(${embeds.length} ${embeds.length == 1 ? 'embed follows.' : 'embeds follow.'})`;
msg.channel.send(msgembed);
for (let embed of embeds) {
msg.channel.send(embed);
};
});
};
}catch(e){
Expand Down

0 comments on commit e503680

Please sign in to comment.