Skip to content

Commit

Permalink
Merge pull request #273 from AmiyaBot/V6-dev
Browse files Browse the repository at this point in the history
V6 dev
  • Loading branch information
vivien8261 authored Jun 17, 2024
2 parents 292e9b1 + 174d337 commit 875809b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/publish.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6.4.5
v6.4.6
2 changes: 1 addition & 1 deletion core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def _(_):
timestamp = int(
time.mktime(
time.strptime(
(datetime.datetime.now() + datetime.timedelta(days=-7)).strftime('%Y%m%d'),
(datetime.datetime.now() + datetime.timedelta(days=-90)).strftime('%Y%m%d'),
'%Y%m%d',
)
)
Expand Down
11 changes: 8 additions & 3 deletions core/database/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from core.cosChainBuilder import COSQQGroupChainBuilder
from typing import Union

from amiyabot.adapters.tencent.qqGlobal import qq_global
from amiyabot.adapters.tencent.qqGroup import qq_group, QQGroupChainBuilderOptions
from amiyabot.adapters.cqhttp import cq_http
from amiyabot.adapters.mirai import mirai_api_http
Expand Down Expand Up @@ -69,6 +70,10 @@ def build_conf(cls, item):
'onebot12': onebot12,
'com_wechat': com_wechat,
}
tx_adapters = {
'qq_group': qq_group,
'qq_global': qq_global,
}

conf = {
'appid': item.appid,
Expand All @@ -83,19 +88,19 @@ def build_conf(cls, item):
http_port=item.http_port,
)

if item.adapter == 'qq_group':
if item.adapter in tx_adapters:
opt = QQGroupChainBuilderOptions(
item.host or '0.0.0.0',
item.http_port or 8086,
'./resource/group_temp',
)
if cos_config.activate:
conf['adapter'] = qq_group(
conf['adapter'] = tx_adapters[item.adapter](
item.client_secret,
default_chain_builder=COSQQGroupChainBuilder(opt),
)
else:
conf['adapter'] = qq_group(
conf['adapter'] = tx_adapters[item.adapter](
item.client_secret,
default_chain_builder_options=opt,
)
Expand Down
8 changes: 8 additions & 0 deletions core/util/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,11 @@ def sorted_dict(data: dict, *args, **kwargs):

def text_to_pinyin(text: str):
return ''.join([item[0] for item in pypinyin.pinyin(text, style=pypinyin.NORMAL)]).lower()

def get_resource_dir():
absolute_path = os.path.abspath('./resource')
return absolute_path

def get_plugin_dir():
absolute_path = os.path.abspath('./plugins')
return absolute_path
2 changes: 1 addition & 1 deletion pluginsDev
Submodule pluginsDev updated 43 files
+11 −2 src/arknights/arknightsGameData/builder/__init__.py
+8 −7 src/arknights/arknightsGameData/builder/operatorBuilder.py
+1 −1 src/arknights/enemy/README-public.md
+1 −1 src/arknights/enemy/README.md
+22 −13 src/arknights/enemy/main.py
+3 −3 src/arknights/material/main.py
+8 −8 src/arknights/operatorArchives/main.py
+1 −1 src/arknights/operatorArchives/operatorCore.py
+7 −1 src/arknights/operatorArchives/template/js/gamedata.js
+6 −2 src/arknights/recruit/main.py
+2 −2 src/blm/main.py
+114 −4 src/blm/src/chat_gpt/chat_gpt_adapter.py
+46 −1 src/blm/src/common/blm_plugin_instance.py
+4 −3 src/blm/src/common/blm_types.py
+25 −1 src/blm/src/ernie/ernie_adapter.py
+58 −0 src/blm/src/functions/core.py
+2 −2 src/game/guess/README-public.md
+2 −2 src/game/guess/README.md
+1 −0 src/game/guess/config_default.yaml
+12 −0 src/game/guess/config_schema.json
+2 −0 src/game/guess/guessBuilder.py
+99 −8 src/game/guess/guessStart.py
+36 −10 src/game/guess/main.py
+1 −0 src/replace/config_default.yaml
+11 −0 src/replace/config_schema.json
+28 −25 src/replace/main.py
+26 −0 src/skland/README.md
+4 −0 src/skland/README_TOKEN.md
+17 −0 src/skland/README_USE-public.md
+4 −0 src/skland/README_USE.md
+74 −15 src/skland/api.py
+8 −0 src/skland/config_templates/global_config_default.json
+35 −0 src/skland/config_templates/global_config_schema.json
+114 −0 src/skland/gacha.py
+162 −11 src/skland/main.py
+ src/skland/template/assets/common_mask.55fff2e9.png
+36 −30 src/skland/template/chars.html
+114 −0 src/skland/template/gacha.css
+275 −0 src/skland/template/gacha.html
+36 −0 src/skland/template/warehouse.css
+52 −0 src/skland/template/warehouse.html
+2 −1 src/user/main.py
+1 −1 src/user/mainBot.py
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amiyabot==1.9.0
amiyabot==1.9.3
attrdict~=2.0.1
baidu-aip
dhash~=1.3
Expand All @@ -13,8 +13,10 @@ peewee~=3.14.10
pillow==9.5.0
pypinyin~=0.46.0
pyyaml~=6.0
requests-html
requests-html~=0.10.0
lxml_html_clean~=0.1.0
srsly~=2.4.3
starlette~=0.19.1
zhon~=1.1.5
cos-python-sdk-v5~=1.9.30
tencentcloud-sdk-python~=3.0.0

0 comments on commit 875809b

Please sign in to comment.