Skip to content

Commit

Permalink
转为发送本地图片
Browse files Browse the repository at this point in the history
  • Loading branch information
forchannot committed Mar 1, 2023
1 parent b7d1260 commit bc458bf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 45 deletions.
8 changes: 3 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from nonebot.adapters.onebot.v11 import Message, Bot, MessageEvent, MessageSegment
from nonebot.params import CommandArg

from .utils.draw import draw_obtain

from .utils.Artifact import (
artifact_obtain,
ARTIFACT_LIST,
Expand All @@ -12,6 +12,7 @@
from .config.config import STAMINA_RESTORE, MAX_STAMINA, Config
from .utils.json_rw import init_user_info, updata_uid_stamina, user_info, save_user_info
from .utils.artifact_eval import *
from pathlib import Path
from base64 import b64encode
from io import BytesIO

Expand Down Expand Up @@ -39,10 +40,7 @@
async def get_obtain_(bot: Bot):
use_pic = Config.parse_obj(get_driver().config.dict()).use_pic
if use_pic:
data = []
for name, artifact in artifact_obtain.items():
data.append((name, " ".join(artifact)))
pic = draw_obtain(data)
pic = Path(__file__).parent / "resources" / "table.png"
await get_obtain.send(MessageSegment.image(pic))
else:
mes = "当前副本如下\n"
Expand Down
3 changes: 0 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
httpx~=0.23.0
Pillow~=9.3.0
requests~=2.28.1
pandas~=1.5.2
matplotlib~=3.6.2
pydantic~=1.9.2
Binary file added resources/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 0 additions & 37 deletions utils/draw.py

This file was deleted.

0 comments on commit bc458bf

Please sign in to comment.