mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
fix(cloud_music): 增加一张图
This commit is contained in:
parent
6c5945cdc7
commit
de5d1515c6
3 changed files with 7 additions and 3 deletions
|
|
@ -184,7 +184,7 @@ pip install -r requirements.txt
|
||||||
- **安装注意**:
|
- **安装注意**:
|
||||||
- 勾选 `Add to PATH` 选项(自动配置环境变量)
|
- 勾选 `Add to PATH` 选项(自动配置环境变量)
|
||||||
- 完成安装后重启终端使配置生效
|
- 完成安装后重启终端使配置生效
|
||||||
验证 Node.js 版本
|
验证 Node.js 版本
|
||||||
#### 2. 验证安装结果
|
#### 2. 验证安装结果
|
||||||
```powershell
|
```powershell
|
||||||
npm -v
|
npm -v
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from nonebot import on_command
|
from nonebot import on_command
|
||||||
from nonebot.rule import to_me
|
from nonebot.rule import to_me
|
||||||
from nonebot.adapters.qq import MessageSegment,MessageEvent
|
from nonebot.adapters.qq import MessageSegment,MessageEvent, Message
|
||||||
from src.clover_music.cloud_music.cloud_music import *
|
from src.clover_music.cloud_music.cloud_music import *
|
||||||
from src.clover_image.delete_file import delete_file
|
from src.clover_image.delete_file import delete_file
|
||||||
|
|
||||||
|
|
@ -28,7 +28,11 @@ async def handle_function(msg: MessageEvent):
|
||||||
session.cookies = pickle.load(open('cloud_music_cookies.cookie', 'rb'))
|
session.cookies = pickle.load(open('cloud_music_cookies.cookie', 'rb'))
|
||||||
session, status,user_id = await netease_cloud_music_is_login(session)
|
session, status,user_id = await netease_cloud_music_is_login(session)
|
||||||
if not status:
|
if not status:
|
||||||
await music.send("登录失效,请联系管理员进行登录")
|
msg = Message([
|
||||||
|
MessageSegment.file_image(Path("src/resources/image/github_repo/ERROR.jpg")),
|
||||||
|
MessageSegment.text("登录失效,请联系管理员进行登录"),
|
||||||
|
])
|
||||||
|
await music.send(msg)
|
||||||
# 检查缓存是否有效(二维码有效期5分钟)
|
# 检查缓存是否有效(二维码有效期5分钟)
|
||||||
if unikey_cache['unikey'] and time.time() < unikey_cache['expires']:
|
if unikey_cache['unikey'] and time.time() < unikey_cache['expires']:
|
||||||
unikey = unikey_cache['unikey']
|
unikey = unikey_cache['unikey']
|
||||||
|
|
|
||||||
BIN
src/resources/image/github_repo/ERROR.jpg
Normal file
BIN
src/resources/image/github_repo/ERROR.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Loading…
Reference in a new issue