Skip to content

Commit

Permalink
add _is_fake
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Sep 6, 2024
1 parent 1673770 commit 6931810
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nonebot_plugin_alias/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ def get_message():
msg.insert(0, new_segment)
return msg

def _is_fake() -> bool:
return True

fake_event = deepcopy(event)
fake_event.get_message = get_message
setattr(fake_event, "_is_fake", _is_fake)
await handle_event(bot, fake_event)

return _matcher

0 comments on commit 6931810

Please sign in to comment.