Skip to content

Commit

Permalink
fix 修复插件依赖的一些问题;修复 Tencent 适配器发送消息的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien8261 committed Nov 6, 2023
1 parent 03b456d commit 6aa6bf4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/publish.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6.4.1
v6.4.1-fix
7 changes: 6 additions & 1 deletion core/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ async def load_plugin_file(self, file: str) -> PLUGIN:
async def install_loaded_plugins(self):
count = 0
for item in sorted(self.plugins.values(), key=lambda n: n.priority, reverse=True):
if item.plugin_id in self.bot.plugins:
continue

try:
res = self.bot.install_plugin(item)
if res:
Expand Down Expand Up @@ -72,8 +75,10 @@ async def check_requirements(self, plugins: PLUGINS_MAP, exists_plugins: Optiona
if req.plugin_id == item.plugin_id:
continue

exists = {**self.bot.plugins, **(exists_plugins or plugins), **final_res}

# 本地已存在此依赖插件
if req.plugin_id in {**(exists_plugins or plugins), **final_res}:
if req.plugin_id in exists:
# 本地的依赖版本不匹配,则不安装此插件
if req.version and req.version != plugins[req.plugin_id].version:
allow_install = False
Expand Down
2 changes: 1 addition & 1 deletion pluginsDev
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amiyabot==1.8.0
amiyabot==1.8.1
attrdict~=2.0.1
baidu-aip
dhash~=1.3
Expand Down

0 comments on commit 6aa6bf4

Please sign in to comment.