Merge pull request #29 from TNTcraftHIM/master

neteasemusic小bug修复
This commit is contained in:
Pentacene 2020-08-26 18:44:11 +08:00 committed by GitHub
commit c063ff0ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -282,10 +282,10 @@
},
{
"name": "neteasemusic",
"version": "1.1",
"version": "1.2",
"section": "daily",
"maintainer": "TNTcraftHIM",
"size": "9.9 kb",
"size": "10.0 kb",
"supported": true,
"des-short": "网易云点歌",
"des": "可以在线搜索并且快速点歌歌曲信息齐全支持直接回复点歌。命令nem。"

View File

@ -145,8 +145,11 @@ async def nem(context):
f.write(music.content)
if (path.getsize(name) / 1024) < 100:
remove(name)
if reply.sender.is_self:
await reply.delete()
try:
if reply.sender.is_self:
await reply.delete()
except:
pass
await context.delete()
res = '你可以点击<a href="https://music.163.com/#/song?id=' + \
str(info['id']) + '">' + \
@ -168,8 +171,11 @@ async def nem(context):
caption=cap,
link_preview=False,
force_document=False)
if reply.sender.is_self:
await reply.delete()
try:
if reply.sender.is_self:
await reply.delete()
except:
pass
try:
remove(name)
except: