Skip to content

Commit

Permalink
hey, using fullmatch is a good idea
Browse files Browse the repository at this point in the history
  • Loading branch information
lyxal authored Dec 27, 2024
1 parent ca3eb56 commit d21c07e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vyxalbot3/commands/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def run(self):
not reaction.reply_to_self
) and event.user_id == self.room.user_id:
continue
if (match := re.match(reaction.pattern, event.content)) is not None:
if (match := re.fullmatch(reaction.pattern, event.content)) is not None:
match reaction:
case CommandReaction():
current_user = await self.current_user(event)
Expand Down Expand Up @@ -298,4 +298,4 @@ async def respond(self, event: MessageEvent, current_user: User, arguments: list
case str(message):
await self.room.send(message, event.message_id)
case (message, reply_to):
await self.room.send(message, reply_to)
await self.room.send(message, reply_to)

0 comments on commit d21c07e

Please sign in to comment.