diff --git a/LittlePaimon-install.ps1 b/LittlePaimon-install.ps1
index 7f4ad9d..d202278 100644
--- a/LittlePaimon-install.ps1
+++ b/LittlePaimon-install.ps1
@@ -126,7 +126,7 @@ Remove-Item go-cqhttp.zip
# 下载源码
git clone $LittlePaimongit --depth=1
Set-Location LittlePaimon
-pip install -r requirements.txt -i $pypi
+python -m pip install -r requirements.txt -i $pypi
Copy-Item -Recurse hoshino\config_example hoshino\config
Set-Location ..
diff --git a/README.md b/README.md
index 473e2c6..635be12 100644
--- a/README.md
+++ b/README.md
@@ -5,10 +5,10 @@
-
+
-
+
@@ -128,7 +128,7 @@
| ------------------------------------------------------------ | --------------------------- | :-------- | -------------- |
| #亲亲/贴贴/拍拍/给爷爬/吃掉/扔掉/撕掉/精神支柱/要我一直 @人/qq号/图片 | 好玩的头像图片gif表情包生成 | 要以#开头 | #精神支柱@群主 |
-## 更新日志
+## 新功能更新
- 3.20 新增Windows一键部署脚本
- 3.22 新增蓝佬授权提供的收益曲线和参考面板攻略图
@@ -136,6 +136,11 @@
- 3.30 个人信息卡片新增层岩巨渊和神里绫人信息
- 3.31 实时便签加入参量质变仪信息
+## 已知问题\待优化
+- [ ] 公共cookie达到每日30次上限时不会更换
+- [ ] 公共cookie没有复用
+- [ ] 指令参数判别不够清晰
+
## ToDo
- [ ] 实时便签树脂提醒
diff --git a/hoshino/modules/Genshin_Paimon/monthinfo/__init__.py b/hoshino/modules/Genshin_Paimon/monthinfo/__init__.py
index 0f416c6..a12ae6e 100644
--- a/hoshino/modules/Genshin_Paimon/monthinfo/__init__.py
+++ b/hoshino/modules/Genshin_Paimon/monthinfo/__init__.py
@@ -14,14 +14,15 @@ async def main(bot,ev):
uid = ''
if len(msg[0]) == 9 and msg[0].isdigit():
uid = msg[0]
- month = msg[1]
+ if len(msg) >= 2:
+ month = msg[1]
+ else:
+ month = datetime.datetime.now().month
else:
month = msg[0]
if month and not month.isdigit():
await bot.send(ev,'月份是不是写错了呀,要阿拉伯数字哦',at_sender=True)
return
- if not month:
- month = datetime.datetime.now().month
qq = str(ev.user_id)
if ev.message_type == 'guild':
rm = str(ev.message)
diff --git a/hoshino/modules/Genshin_Paimon/player_card/get_img.py b/hoshino/modules/Genshin_Paimon/player_card/get_img.py
index 4c10ecb..14dc7ba 100644
--- a/hoshino/modules/Genshin_Paimon/player_card/get_img.py
+++ b/hoshino/modules/Genshin_Paimon/player_card/get_img.py
@@ -11,14 +11,14 @@ def get_font(size):
return ImageFont.truetype(os.path.join(res_path,'msyh.ttc'), size)
def get_expl_per(percentage):
- if percentage == 0:
- return '0%'
- elif percentage != 1000:
+ if percentage < 10:
+ return f'0.{percentage}%'
+ elif percentage == 1000:
+ return '100%'
+ else:
p = list(str(percentage))
p.insert(-1, '.')
return ''.join(p) + '%'
- else:
- return '100%'
async def get_chara_card(data):
chara_card = Image.new("RGBA", (226, 313), (255, 255, 255, 255))
@@ -94,6 +94,7 @@ async def draw_homes_data(bg_draw,homes):
async def draw_world_data(bg_draw,data):
# 世界探索
+ noneExp = {'level': 0, 'exploration_percentage': 0, 'offerings': [{'level': 0}]}
for d in data['world_explorations']:
if d['name'] == '渊下宫':
Enkanomiya = d
@@ -110,30 +111,58 @@ async def draw_world_data(bg_draw,data):
elif d['name'] == '层岩巨渊·地下矿区':
ChasmsMawL = d
# 蒙德
+ try:
+ type(Mengde)
+ except:
+ Mengde = noneExp
bg_draw.text((1295, 148), get_expl_per(Mengde['exploration_percentage']),
font=get_font(30), fill='white')
bg_draw.text((1296, 204), 'Lv.' + str(Mengde['level']), font=get_font(30), fill='white')
# 雪山
+ try:
+ type(Dragonspine)
+ except:
+ Dragonspine = noneExp
bg_draw.text((1747, 148),
get_expl_per(Dragonspine['exploration_percentage']),
font=get_font(30), fill='white')
bg_draw.text((1746, 204), 'Lv.' + str(Dragonspine['level']), font=get_font(30), fill='white')
# 璃月
+ try:
+ type(Liyue)
+ except:
+ Liyue = noneExp
bg_draw.text((1295, 310),
get_expl_per(Liyue['exploration_percentage']),
font=get_font(30), fill='white')
bg_draw.text((1296, 366), 'Lv.' + str(Liyue['level']), font=get_font(30), fill='white')
# 稻妻
+ try:
+ type(Daoqi)
+ except:
+ Daoqi = noneExp
bg_draw.text((1747, 291),
get_expl_per(Daoqi['exploration_percentage']),
font=get_font(30), fill='white')
bg_draw.text((1746, 336), 'Lv.' + str(Daoqi['level']), font=get_font(30), fill='white')
bg_draw.text((1746, 380), 'Lv.' + str(Daoqi['offerings'][0]['level']), font=get_font(30), fill='white')
# 渊下宫
+ try:
+ type(Enkanomiya)
+ except:
+ Enkanomiya = noneExp
bg_draw.text((1747, 505),
get_expl_per(Enkanomiya['exploration_percentage']),
font=get_font(30), fill='white')
# 层岩巨渊
+ try:
+ type(ChasmsMawH)
+ except:
+ ChasmsMawH = noneExp
+ try:
+ type(ChasmsMawL)
+ except:
+ ChasmsMawL = noneExp
bg_draw.text((1295, 455),
get_expl_per(ChasmsMawH['exploration_percentage']),
font=get_font(30), fill='white')