From 4c650f9aa127dfac51c961628f2f63a082da87d2 Mon Sep 17 00:00:00 2001 From: SiHuan <49349784+Si-Huan@users.noreply.github.com> Date: Tue, 25 Aug 2020 22:34:51 +0800 Subject: [PATCH] use music cq code --- worker/music.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/music.py b/worker/music.py index 04df6ba..6cb0b54 100644 --- a/worker/music.py +++ b/worker/music.py @@ -18,8 +18,8 @@ class Ans(StdAns): resp = requests.get(url=url,params=params).json() # print(resp) musicid = resp['result']['songs'][0]['id'] - musicname = resp['result']['songs'][0]['name'] - msg = '[CQ:share,url=https://music.163.com/song/' + str(musicid) + '/,title=' + str(musicname) + ']' + # musicname = resp['result']['songs'][0]['name'] + msg = f'[CQ:music,type=163,id={musicid}]' except Exception as e: print(e) msg = '什么东西坏掉了,大概是网易云吧...不可能是咱!'