mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
✨ Feature: on_x 支持 expire_time 参数 (#1106)
Co-authored-by: Dobiichi-Origami <454470535@qq.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: yanyongyu <42488585+yanyongyu@users.noreply.github.com>
This commit is contained in:
7
tests/plugins/matcher/matcher_expire.py
Normal file
7
tests/plugins/matcher/matcher_expire.py
Normal file
@ -0,0 +1,7 @@
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from nonebot.matcher import Matcher
|
||||
|
||||
test_temp_matcher = Matcher.new("test", temp=True)
|
||||
test_datetime_matcher = Matcher.new("test", expire_time=datetime.now())
|
||||
test_timedelta_matcher = Matcher.new("test", expire_time=timedelta(seconds=-1))
|
Reference in New Issue
Block a user