Compare commits

..

2 Commits
1.1.1 ... 1.1.2

Author SHA1 Message Date
aff2fa120a 🔖 1.1.2 2024-05-10 11:49:05 +08:00
1c057661c2 🐛 防止历史记录一条都没有的数组越界 2024-05-10 11:48:47 +08:00
2 changed files with 8 additions and 2 deletions

View File

@@ -241,7 +241,13 @@ class Processor(ProcessorMeta):
if extra is not None:
historical_data = list(historical_data)
historical_data.append(extra)
if not historical_data:
return [
TETRIOInfo.TetraLeagueHistory.Data(record_at=today - forward, tr=user_info.data.user.league.rating),
TETRIOInfo.TetraLeagueHistory.Data(
record_at=today.replace(microsecond=1000), tr=user_info.data.user.league.rating
),
]
histories = [
TETRIOInfo.TetraLeagueHistory.Data(
record_at=i.processed_data.user_info.cache.cached_at.astimezone(ZoneInfo('Asia/Shanghai')),

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = 'nonebot-plugin-tetris-stats'
version = '1.1.1'
version = '1.1.2'
description = '一款基于 NoneBot2 的用于查询 Tetris 相关游戏数据的插件'
authors = ['scdhh <wallfjjd@gmail.com>']
readme = 'README.md'