格式化提交

This commit is contained in:
MingxuanGame 2022-02-14 19:18:20 +08:00
parent 5ca303c2f9
commit 47a9595785
5 changed files with 505 additions and 361 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.idea/

View File

@ -49,8 +49,9 @@ else
- [PaimonBot](https://github.com/XiaoMiku01/PaimonBot) - 插件原始代码来自于它 - [PaimonBot](https://github.com/XiaoMiku01/PaimonBot) - 插件原始代码来自于它
- [YuanShen_User_Info](https://github.com/Womsxd/YuanShen_User_Info) - 米游社API来自于它 - [YuanShen_User_Info](https://github.com/Womsxd/YuanShen_User_Info) - 米游社API来自于它
- [MiniGG](https://www.minigg.cn/)* - Wiki API来自于它 - *[MiniGG](https://www.minigg.cn/)* - Wiki API来自于它
- [@MingxuanGame](https://github.com/MingxuanGame) - 移植Nonebot2至[nonebot2-beta1](https://github.com/KimigaiiWuyi/GenshinUID/tree/nonebot2-beta1) - [@MingxuanGame](https://github.com/MingxuanGame) -
移植Nonebot2至[nonebot2-beta1](https://github.com/KimigaiiWuyi/GenshinUID/tree/nonebot2-beta1)
- [@AMEKENN](https://github.com/AMEKENN) - 米游社签到部分的代码指导 - [@AMEKENN](https://github.com/AMEKENN) - 米游社签到部分的代码指导
- [@lgc233](https://github.com/lgc2333) - 众多优秀PR贡献 - [@lgc233](https://github.com/lgc2333) - 众多优秀PR贡献
- [@RemKeeper](https://github.com/RemKeeper) - 简易Cookies获取文档 - [@RemKeeper](https://github.com/RemKeeper) - 简易Cookies获取文档

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,6 @@ from re import findall
import numpy as np import numpy as np
from PIL import Image, ImageDraw, ImageFont, ImageFilter from PIL import Image, ImageDraw, ImageFont, ImageFilter
from httpx import get from httpx import get
from nonebot.adapters.onebot.v11 import Message
from wordcloud import WordCloud from wordcloud import WordCloud
from .get_data import get_info, get_character, get_spiral_abyss_info, get_mihoyo_bbs_info, \ from .get_data import get_info, get_character, get_spiral_abyss_info, get_mihoyo_bbs_info, \
@ -652,7 +651,7 @@ async def draw_abyss0_pic(uid, nickname, image=None, mode=2, date="1"):
bg_img.save(result_buffer, format='JPEG', subsampling=0, quality=90) bg_img.save(result_buffer, format='JPEG', subsampling=0, quality=90)
# bg_img.save(result_buffer, format='PNG') # bg_img.save(result_buffer, format='PNG')
imgmes = 'base64://' + b64encode(result_buffer.getvalue()).decode() imgmes = 'base64://' + b64encode(result_buffer.getvalue()).decode()
resultmes = Message(f"[CQ:image,file={imgmes}]") resultmes = f"[CQ:image,file={imgmes}]"
return resultmes return resultmes
@ -848,7 +847,7 @@ async def draw_abyss_pic(uid, nickname, floor_num, image=None, mode=2, date="1")
bg_img.save(result_buffer, format='JPEG', subsampling=0, quality=90) bg_img.save(result_buffer, format='JPEG', subsampling=0, quality=90)
# bg_img.save(result_buffer, format='PNG') # bg_img.save(result_buffer, format='PNG')
imgmes = 'base64://' + b64encode(result_buffer.getvalue()).decode() imgmes = 'base64://' + b64encode(result_buffer.getvalue()).decode()
resultmes = Message(f"[CQ:image,file={imgmes}]") resultmes = f"[CQ:image,file={imgmes}]"
return resultmes return resultmes

View File

@ -1,5 +1,6 @@
nonebot==1.8.2 nonebot~=1.6.0
requests==2.25.1 requests==2.25.1
httpx==0.18.1 httpx==0.18.1
Pillow>=8.3.1 Pillow>=8.3.1
wordcloud>=1.8.1 wordcloud>=1.8.1
numpy~=1.22.2