mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-12-16 13:40:53 +08:00
🐛 优化权限管理
This commit is contained in:
parent
f18f0ad211
commit
b0879f6e02
@ -166,5 +166,7 @@ async def _(event: MessageEvent, matcher: Matcher):
|
||||
user_id=event.user_id,
|
||||
message_type=event.message_type,
|
||||
time=datetime.datetime.now())
|
||||
except IgnoredException:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.info('插件管理器', f'插件权限检查<r>失败:{e}</r>')
|
||||
|
@ -79,7 +79,7 @@ class LearningChat:
|
||||
elif self.data.user_id in self.ban_users:
|
||||
# 发言人在屏蔽列表中,跳过
|
||||
logger.debug('群聊学习', f'➤发言人<m>{self.data.user_id}</m>在屏蔽列表中,跳过')
|
||||
elif self.to_me and '不可以' in self.data.message:
|
||||
elif self.to_me and any(w in self.data.message for w in {'不可以', '达咩', '不能说这'}):
|
||||
# 如果是对某句话进行禁言
|
||||
return Result.Ban
|
||||
elif self.to_me and any(
|
||||
|
@ -61,7 +61,7 @@ async def _(event: GroupMessageEvent, state: T_State, match: dict = RegexDict(),
|
||||
state['plugin_no_exist'] = []
|
||||
if any(w in match['plugin'] for w in {'all', '全部'}):
|
||||
state['is_all'] = True
|
||||
state['plugin'] = [p for p in PluginManager.plugins.keys() if p != 'plugin_manager']
|
||||
state['plugin'] = list(PluginManager.plugins.keys())
|
||||
else:
|
||||
state['is_all'] = False
|
||||
state['plugin'] = []
|
||||
|
@ -25,7 +25,7 @@ async def draw_plugin_card(plugin: PluginInfo):
|
||||
|
||||
async def draw_help(plugin_list: List[PluginInfo]):
|
||||
bg = PMImage(await load_image(RESOURCE_BASE_PATH / 'general' / 'bg.png'))
|
||||
img = PMImage(size=(1080, 500 * len(plugin_list)), color=(255, 255, 255, 0), mode='RGBA')
|
||||
img = PMImage(size=(1080, 1000 + 600 * len(plugin_list)), color=(255, 255, 255, 0), mode='RGBA')
|
||||
orange_line = await load_image(RESOURCE_BASE_PATH / 'general' / 'orange.png')
|
||||
orange_name_bg = await load_image(RESOURCE_BASE_PATH / 'general' / 'orange_card.png')
|
||||
black_line = await load_image(RESOURCE_BASE_PATH / 'general' / 'black2.png')
|
||||
|
Loading…
x
Reference in New Issue
Block a user