diff --git a/starbot/core/model.py b/starbot/core/model.py index 253d48f..f10ed48 100644 --- a/starbot/core/model.py +++ b/starbot/core/model.py @@ -220,7 +220,7 @@ class DynamicUpdate(BaseModel): def default(cls): """ 获取功能全部开启的默认 DynamicUpdate 实例 - 默认配置:启用动态推送,推送内容模板为 "{uname} {action}\n{url}" + 默认配置:启用动态推送,推送内容模板为 "{uname} {action}\n{url}{next}{picture}" """ return DynamicUpdate(enabled=True, message=DynamicUpdate.DEFAULT_MESSAGE) diff --git a/starbot/painter/LiveReportGenerator.py b/starbot/painter/LiveReportGenerator.py index f785c71..06aacac 100644 --- a/starbot/painter/LiveReportGenerator.py +++ b/starbot/painter/LiveReportGenerator.py @@ -285,13 +285,13 @@ class LiveReportGenerator: ) pic.draw_img_alpha(pic.auto_size_img_by_limit(guard_list_img, logo_limit)) - # 盲盒盈亏曲线图 + # 盲盒盈亏折线图 if model.box_profit_diagram: profits = param.get("box_profit_diagram", []) if profits: profits.insert(0, 0.0) - pic.draw_section("盲盒盈亏曲线图") + pic.draw_section("盲盒盈亏折线图") diagram = cls.__get_box_profit_diagram(profits, pic.width - (margin * 2)) pic.draw_img_alpha(pic.auto_size_img_by_limit(diagram, logo_limit)) diff --git a/starbot/utils/redis.py b/starbot/utils/redis.py index 8d7c8e3..f8791af 100644 --- a/starbot/utils/redis.py +++ b/starbot/utils/redis.py @@ -85,6 +85,13 @@ async def hexists(key: str, hkey: Union[str, int]) -> bool: return await __redis.hexists(key, hkey) +async def hget(key: str, hkey: Union[str, int]) -> str: + result = await __redis.hget(key, hkey) + if result is None: + return "" + return result.decode() + + async def hgeti(key: str, hkey: Union[str, int]) -> int: result = await __redis.hget(key, hkey) if result is None: