Skip to content

Commit 3ae31ab

Browse files
committed
refractor: remove emoji search if the file already exists
1 parent 1b99785 commit 3ae31ab

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/commands/play.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default async function play(msg: Message) {
8181

8282
if (await fileExists(savePath)) {
8383
const media = MessageMedia.fromFilePath(savePath);
84-
await msg.reply(media);
84+
await Promise.all([msg.reply(media), msg.react("")]);
8585
return;
8686
}
8787

src/commands/video.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ export default async function (msg: Message) {
7272

7373
if (await fileExists(tempPath)) {
7474
const media = MessageMedia.fromFilePath(tempPath);
75-
await msg.reply(media, undefined, {
76-
caption: video.title.text,
77-
});
75+
76+
await Promise.all([
77+
msg.reply(media, undefined, {
78+
caption: video.title.text,
79+
}),
80+
msg.react(""),
81+
]);
7882
return;
7983
}
8084

0 commit comments

Comments
 (0)