Update qymusic.py

This commit is contained in:
SiHuan 2020-08-25 22:55:53 +08:00 committed by GitHub
parent 784cc4e2d3
commit 632ec2bb8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,9 +29,9 @@ class Ans(StdAns):
# print(resp) # print(resp)
if resp['data']['song']['totalnum'] == 0: if resp['data']['song']['totalnum'] == 0:
return '啊嘞嘞好像没有诶qaq' return '啊嘞嘞好像没有诶qaq'
# mid = resp['data']['song']['list'][0]['mid'] mid = resp['data']['song']['list'][0]['mid']
id = resp['data']['song']['list'][0]['id'] # id = resp['data']['song']['list'][0]['id']
msg = f'[CQ:music,type=qq,id={id}]' msg = f'[CQ:music,type=qq,id={mid}]'
# mname = resp['data']['song']['list'][0]['name'] # mname = resp['data']['song']['list'][0]['name']
# msg = '[CQ:share,url=https://y.qq.com/n/yqq/song/' + str(mid) + '.html,title=' + str(mname) + ']' # msg = '[CQ:share,url=https://y.qq.com/n/yqq/song/' + str(mid) + '.html,title=' + str(mname) + ']'
except Exception as e: except Exception as e: