mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
🐛 未使用matcher_patch可能导致的报错
This commit is contained in:
parent
bfec19fb08
commit
32f9fe23da
@ -140,8 +140,8 @@ async def _(event: MessageEvent, matcher: Matcher):
|
||||
|
||||
# 命令调用统计
|
||||
if matcher.plugin_name in plugin_manager.data and 'pm_name' in matcher.state:
|
||||
if matcher_info := filter(lambda x: x.pm_name == matcher.state['pm_name'], plugin_manager.data[matcher.plugin_name].matchers):
|
||||
matcher_info = list(matcher_info)[0]
|
||||
if matcher_info := list(filter(lambda x: x.pm_name == matcher.state['pm_name'], plugin_manager.data[matcher.plugin_name].matchers)):
|
||||
matcher_info = matcher_info[0]
|
||||
await PluginStatistics.create(plugin_name=matcher.plugin_name,
|
||||
matcher_name=matcher_info.pm_name,
|
||||
matcher_usage=matcher_info.pm_usage,
|
||||
|
Loading…
Reference in New Issue
Block a user