mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-11-03 16:36:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			311 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			311 B
		
	
	
	
		
			Python
		
	
	
	
	
	
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() - timedelta(seconds=1)
 | 
						|
)
 | 
						|
test_timedelta_matcher = Matcher.new("test", expire_time=timedelta(seconds=-1))
 |