From ec5ecd172f3eac10abe733a23aceb0d663d767c3 Mon Sep 17 00:00:00 2001 From: TNTcraftHIM Date: Wed, 26 Aug 2020 18:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E6=80=A5bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list.json | 4 ++-- neteasemusic.py | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/list.json b/list.json index 9553492..bee8179 100644 --- a/list.json +++ b/list.json @@ -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。" diff --git a/neteasemusic.py b/neteasemusic.py index 3447e75..28c0aa5 100644 --- a/neteasemusic.py +++ b/neteasemusic.py @@ -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 = '你可以点击' + \ @@ -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: