Skip to content

Commit

Permalink
Refactor handleMessageCreate to handle message replies and add sasuda…
Browse files Browse the repository at this point in the history
…i reaction
  • Loading branch information
k-taro56 committed Jun 2, 2024
1 parent a3880e0 commit 7e6ae7d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ export const handleMessageCreate =
sasudaiReaction(message);
}

if (message.reference?.messageId) {
const repliedMessage = await message.fetchReference();
if (message.content === '!daihyo') {
message.delete();
sasudaiReaction(repliedMessage);
}
}

Check warning on line 23 in src/index.ts

View check run for this annotation

Codecov / codecov/patch

src/index.ts#L18-L23

Added lines #L18 - L23 were not covered by tests

if (message.content === '!sasudai') {
message.reply('https://x.com/STECH_FES/status/1773995315420631265');
sasudaiReaction(message);
Expand Down

0 comments on commit 7e6ae7d

Please sign in to comment.