Skip to content

Commit dfa1d5c

Browse files
committed
Skip uris that have supressed embeds
1 parent 057cdad commit dfa1d5c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/commands/instagram.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,14 @@ export default class InstagramLink implements SpecialCommand {
5353
return;
5454
}
5555

56+
const urisToProcess = uris.filter(uri => !content.includes("<" + uri + ">"));
57+
if (urisToProcess.length === 0) {
58+
return;
59+
}
60+
5661
await message.channel.sendTyping();
5762

58-
for (const postUri of uris) {
63+
for (const postUri of urisToProcess) {
5964
const result = await instagramService.downloadInstagramContent(context, postUri);
6065
if (!result.success) {
6166
const failureReaction = message.guild?.emojis.cache.find(e => e.name === "sadge");

0 commit comments

Comments
 (0)