Skip to content

Commit

Permalink
[🚀]bump version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benx1n committed Aug 29, 2023
1 parent 4eb423d commit cc19652
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .env.prod-example
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ SUPERUSERS=["1119809439"] #替换为你自己的QQ号,确认与BOT是好
USE_PLUGIN_GO_CQHTTP = false #使用内嵌go-cqhttp插件,如果一直连不上请将此项值改为false,并按教程下载go-cqhttp
GOCQ_WEBUI_USERNAME=admin #如果上一项设置为true,请将此处的账号修改为自定义,不配置账号和密码请删除这两项
GOCQ_WEBUI_PASSWORD=admin #如果上一项设置为true,请将此处的密码修改为自定义,不配置账号和密码请删除这两项
GOCQ_CONFIG_TEMPLATE_PATH = ./config-template.yml
GOCQ_REPO = "benx1n/go-cqhttp"

private = false #开启私聊
group = true #开启群聊
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_x86-64_pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
call %CONDA%/condabin/conda.bat create --prefix .\pyenv python
call %CONDA%/condabin/conda.bat activate .\pyenv
python -m pip install --upgrade pip
python -m pip install nb-cli hikari-bot nonebot2[fastapi]
python -m pip install nb-cli hikari-bot nonebot2[fastapi] hikari-core
python -m pip install nonebot-plugin-apscheduler
python -m pip install nonebot-plugin-gocqhttp
python -m pip install nonebot-plugin-guild-patch
Expand Down
2 changes: 1 addition & 1 deletion Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN cd /home \
&& echo "!*.bat" >> ./.git/info/sparsecheckout \
&& git pull origin master \
&& rm -rf .git
RUN pip install nb-cli hikari-bot nonebot2[fastapi]\
RUN pip install nb-cli hikari-bot nonebot2[fastapi] hikari-core\
&& nb plugin install nonebot-plugin-apscheduler \
&& nb plugin install nonebot-plugin-gocqhttp \
&& playwright install chromium
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hikari-bot"
version = "0.3.9.6"
version = "1.0.0"
description = "Nonebot2 HikariBot,支持战舰世界水表查询"
authors = ["benx1n <[email protected]>"]
license = "MIT"
Expand All @@ -23,7 +23,7 @@ httpx = { version = ">=0.24.0", extras = ["http2"] }
Jinja2 = "^3.0.0"
beautifulsoup4 = "^4.11.1"
orjson = "^3.8.11"
hikari-core = "^0.3.0"
hikari-core = "^1.0.0"

[tool.poetry.group.dev.dependencies]
nb-cli = "^0.6.0"
Expand All @@ -32,9 +32,9 @@ black = {version = "^23.1a1", allow-prereleases = true}
isort = "^5.12.0"

[tool.nonebot]
plugins = ["nonebot_plugin_apscheduler","nonebot_plugin_guild_patch"]
#plugins = ["nonebot_plugin_apscheduler", "nonebot_plugin_htmlrender","nonebot_plugin_guild_patch","hikari_bot"]
plugin_dirs = ["src/plugins"]
#plugins = ["nonebot_plugin_apscheduler","nonebot_plugin_guild_patch"]
plugins = ["nonebot_plugin_apscheduler","nonebot_plugin_guild_patch","hikari_bot"]
#plugin_dirs = ["src/plugins"]

[[tool.poetry.source]]
name = "tsinghua"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/hikari_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
is_first_run = True
_nlmt = DailyNumberLimiter(_max)
_flmt = FreqLimiter(3)
__version__ = '0.3.9.5'
__version__ = '1.0.0'

bot_get_random_pic = on_fullmatch('wws 随机表情包', block=True, priority=5)
bot_update = on_command('wws 更新Hikari', priority=5, block=True, permission=SUPERUSER)
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/hikari_bot/game/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import httpx
import orjson
from httpx import TimeoutException
from nonebot.log import logger

from ..data_source import config
Expand Down Expand Up @@ -35,6 +36,9 @@ async def pic2txt_byOCR(img_path, filename):
if result['code'] == 200:
logger.success(f"OCR结果:{result['data']['msg']},耗时{end-start:.4f}s\n图片url:{img_path}")
return result['data']['msg']
except TimeoutException:
logger.error('ocr超时,请确认OCR服务是否在线')
return ''
except Exception:
logger.error(traceback.format_exc())
return ''
Expand Down

0 comments on commit cc19652

Please sign in to comment.