Skip to content

Commit

Permalink
chore: Refactor handleMessageCreate to improve message content matching
Browse files Browse the repository at this point in the history
  • Loading branch information
k-taro56 committed Jun 1, 2024
1 parent f1ff74c commit 9dda3a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const sasudaiReaction = (message: Message) => {

export const handleMessageCreate =
(client: Client) => async (message: Message) => {
if (message.content.includes('代表')) {
if (message.content.match(/代\s*[\s\S]{0,2}\s*表/)) {
sasudaiReaction(message);
}

Expand Down

0 comments on commit 9dda3a4

Please sign in to comment.