mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-11-03 16:36:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			456 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			456 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from nonebot.matcher import Matcher
 | 
						|
from nonebot.permission import USER, Permission
 | 
						|
 | 
						|
default_permission = Permission()
 | 
						|
 | 
						|
test_permission_updater = Matcher.new(permission=default_permission)
 | 
						|
 | 
						|
test_user_permission_updater = Matcher.new(
 | 
						|
    permission=USER("test", perm=default_permission)
 | 
						|
)
 | 
						|
 | 
						|
test_custom_updater = Matcher.new(permission=default_permission)
 | 
						|
 | 
						|
 | 
						|
@test_custom_updater.permission_updater
 | 
						|
async def _() -> Permission:
 | 
						|
    return default_permission
 |