修复文件过大时无法作为MP3直接播放的BUG

修复bug=10min
找bug怎么修=10h
This commit is contained in:
TNTcraftHIM 2020-08-28 03:07:57 +08:00
parent 369784be24
commit 61f5229365
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -12,6 +12,7 @@ from pagermaid.utils import obtain_message
from os import remove, path from os import remove, path
from os.path import exists from os.path import exists
from collections import defaultdict from collections import defaultdict
from telethon.tl.types import DocumentAttributeAudio
songid = '' songid = ''
name = '' name = ''
@ -387,7 +388,9 @@ async def nem(context):
name, name,
caption=cap, caption=cap,
link_preview=False, link_preview=False,
force_document=False) force_document=False,
attributes=(DocumentAttributeAudio(0),)
)
try: try:
if reply.sender.is_self: if reply.sender.is_self:
await reply.delete() await reply.delete()