Skip to content

Commit c02ce5b

Browse files
committed
Improve TikTok embed logic
No I was not vibecoding :harold:
1 parent 8b46c3b commit c02ce5b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/commands/tiktok.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export default class TikTokLink implements SpecialCommand {
2828
content: `https://kktiktok.com/${match[1]}`,
2929
allowedMentions: { repliedUser: false },
3030
});
31-
await Promise.all([message.suppressEmbeds(true), reply.suppressEmbeds(true)]);
31+
32+
if (reply.embeds.length > 0) {
33+
await message.suppressEmbeds(true);
34+
} else {
35+
await reply.delete();
36+
}
3237
}
3338
}

0 commit comments

Comments
 (0)