修复ys和ssbq,更新README

This commit is contained in:
CMHopeSunshine 2022-04-07 11:32:10 +08:00
parent d8c829f1ce
commit 970573e44a
4 changed files with 47 additions and 12 deletions

View File

@ -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 ..

View File

@ -5,10 +5,10 @@
<h4 align="center">✨基于<a href="https://github.com/Ice-Cirno/HoshinoBot" target="_blank">HoshinoBot</a><a href="https://github.com/Mrs4s/go-cqhttp" target="_blank">go-cqhttp</a>的原神Q群机器人✨</h4>
<p align="center">
<img src="https://img.shields.io/badge/version-v1.0.2-red" alt="version">
<img src="https://img.shields.io/badge/version-v1.0.3-red" alt="version">
<a href="https://cdn.jsdelivr.net/gh/CMHopeSunshine/LittlePaimon@master/LICENSE"><img src="https://img.shields.io/github/license/CMHopeSunshine/LittlePaimon" alt="license"></a>
<img src="https://img.shields.io/badge/Python-3.8+-yellow" alt="python">
<a href="https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=MmWrI&from=246610&biz=ka"><img src="https://img.shields.io/badge/QQ频道-尘世闲游-green?style=flat-square" alt="QQ guild"></a>
<a href="https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=MmWrI&from=246610&biz=ka"><img src="https://img.shields.io/badge/QQ频道交流-尘世闲游-green?style=flat-square" alt="QQ guild"></a>
</p>
@ -128,7 +128,7 @@
| ------------------------------------------------------------ | --------------------------- | :-------- | -------------- |
| #亲亲/贴贴/拍拍/给爷爬/吃掉/扔掉/撕掉/精神支柱/要我一直 @人/qq号/图片 | 好玩的头像图片gif表情包生成 | 要以#开头 | #精神支柱@群主 |
## 更新日志
## 新功能更新
- 3.20 新增Windows一键部署脚本
- 3.22 新增蓝佬授权提供的收益曲线和参考面板攻略图
@ -136,6 +136,11 @@
- 3.30 个人信息卡片新增层岩巨渊和神里绫人信息
- 3.31 实时便签加入参量质变仪信息
## 已知问题\待优化
- [ ] 公共cookie达到每日30次上限时不会更换
- [ ] 公共cookie没有复用
- [ ] 指令参数判别不够清晰
## ToDo
- [ ] 实时便签树脂提醒

View File

@ -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)

View File

@ -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')