mirror of
				https://github.com/suyiiyii/nonebot-bison.git
				synced 2025-11-04 21:44:52 +08:00 
			
		
		
		
	✨ 无权限用户尝试添加订阅时返回提示信息
This commit is contained in:
		
							parent
							
								
									67983bd4f0
								
							
						
					
					
						commit
						85cc112599
					
				@ -108,6 +108,16 @@ async def do_dispatch_command(
 | 
			
		||||
    asyncio.create_task(new_matcher_ins.run(bot, event, state))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
no_permission_matcher = on_command(
 | 
			
		||||
    "无权限", rule=configurable_to_me, aliases={"添加订阅", "删除订阅", "群管理"}, priority=8, block=True
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@no_permission_matcher.handle()
 | 
			
		||||
async def send_no_permission():
 | 
			
		||||
    await no_permission_matcher.finish("您没有权限进行此操作,请联系Bot所有者")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
__all__ = [
 | 
			
		||||
    "common_platform",
 | 
			
		||||
    "add_sub_matcher",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user