Skip to content

Commit

Permalink
Merge pull request #360 from SK-415/dev
Browse files Browse the repository at this point in the history
Publish v1.5.4
  • Loading branch information
SK-415 authored May 4, 2023
2 parents d1f0d09 + aa10b7b commit 672d051
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 222 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project ignored
*.sqlite3
.pdm.toml
.pdm-python

docs/.yarn
data/
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ HARUKA_COMMAND_PREFIX="hb"

## HARUKA_GUILD_ADMIN_ROLES

默认值:["管理员", "频道主"]
默认值:["超级管理员", "频道主"]

在频道里使用命令的身份组,可以写入多个身份组

Expand Down
2 changes: 1 addition & 1 deletion haruka_bot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Config(BaseSettings):
haruka_dynamic_font: Optional[str] = "Noto Sans CJK SC"
haruka_command_prefix: str = ""
# 频道管理员身份组
haruka_guild_admin_roles: List[str] = ["频道主", "管理员"]
haruka_guild_admin_roles: List[str] = ["频道主", "超级管理员"]

@validator("haruka_interval", "haruka_live_interval", "haruka_dynamic_interval")
def non_negative(cls, v: int, field: ModelField):
Expand Down
5 changes: 4 additions & 1 deletion haruka_bot/plugins/pusher/dynamic_pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def dy_sched():
return

dynamic = None
for dynamic in dynamics[::-1]: # 动态从旧到新排列
for dynamic in sorted(dynamics, key=lambda x: int(x.extend.dyn_id_str)): # 动态从旧到新排列
dynamic_id = int(dynamic.extend.dyn_id_str)
if dynamic_id > offset[uid]:
logger.info(f"检测到新动态({dynamic_id}):{name}{uid})")
Expand All @@ -75,6 +75,9 @@ async def dy_sched():
if image is None:
logger.debug(f"动态不存在,已跳过:{url}")
return
elif dynamic.card_type == DynamicType.live_rcmd:
logger.debug(f"直播推荐动态,已跳过:{url}")
return

type_msg = {
0: "发布了新动态",
Expand Down
2 changes: 1 addition & 1 deletion haruka_bot/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from packaging.version import Version

__version__ = "1.5.3.post2"
__version__ = "1.5.4"
VERSION = Version(__version__)
388 changes: 185 additions & 203 deletions pdm.lock

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ authors = [
license = {text = "AGPL-3.0-or-later"}
requires-python = ">=3.8,<4.0"
dependencies = [
"click~=8.1",
"httpx~=0.23",
"nonebot-adapter-onebot~=2.2",
"nonebot-plugin-apscheduler~=0.2",
"nonebot2[fastapi]<3,>=2.0.0rc3",
"playwright~=1.30",
"pydantic~=1.10",
"python-dotenv~=0.21",
"tortoise-orm[asyncpg]~=0.19",
"bilireq~=0.2",
"packaging~=23.0",
"nonebot-plugin-guild-patch~=0.2",
"msvc-runtime~=14.34; sys_platform == \"win32\"",
"click>=8.1.3",
"httpx>=0.24.0",
"nonebot-adapter-onebot>=2.2.3",
"nonebot-plugin-apscheduler>=0.2.0",
"nonebot2[fastapi]>=2.0.0rc4",
"playwright>=1.33.0",
"pydantic>=1.10.7",
"python-dotenv>=1.0.0",
"tortoise-orm[asyncpg]>=0.19.3",
"bilireq>=0.2.5",
"packaging>=23.1",
"nonebot-plugin-guild-patch>=0.2.3",
"msvc-runtime>=14.34.31931; sys_platform == \"win32\"",
]
dynamic = ["version"]
name = "haruka-bot"
Expand All @@ -34,7 +34,7 @@ documentation = "https://github.com/SK-415/HarukaBot#readme"

[tool.pdm.dev-dependencies]
dev = [
"nonebot-plugin-gocqhttp>=0.6.4",
"nonebot-plugin-gocqhttp>=0.6.10",
]

[tool.nonebot]
Expand Down

0 comments on commit 672d051

Please sign in to comment.