mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
✨ 去掉无用的提示,新群默认有权限
This commit is contained in:
parent
08ab50d152
commit
206b86ea90
@ -106,7 +106,7 @@ async def _(event: MessageEvent, matcher: Matcher):
|
||||
perm = await PluginPermission.get_or_none(name=matcher.plugin_name, session_id=session_id, session_type=session_type)
|
||||
|
||||
if not perm:
|
||||
raise IgnoredException('插件使用权限未设置')
|
||||
return
|
||||
if not perm.status:
|
||||
raise IgnoredException('插件使用权限已禁用')
|
||||
if isinstance(event, GroupMessageEvent) and event.user_id in perm.ban:
|
||||
|
@ -40,8 +40,8 @@ class PluginManager:
|
||||
"""
|
||||
if self.config_path.exists():
|
||||
self.config = load_yaml(self.config_path)
|
||||
else:
|
||||
logger.warning('插件管理器', '无法读取LittlePaimon配置文件,请检查目录')
|
||||
# else:
|
||||
# logger.warning('插件管理器', '无法读取LittlePaimon配置文件,请检查目录')
|
||||
for file in self.plugin_config_path.iterdir():
|
||||
if file.is_file() and file.name.endswith('.yml'):
|
||||
data = load_yaml(file)
|
||||
|
Loading…
Reference in New Issue
Block a user