Merge pull request #36 from TNTcraftHIM/master

修复文件过大时无法作为MP3直接播放的BUG!!
This commit is contained in:
Pentacene 2020-08-28 03:11:00 +08:00 committed by GitHub
commit 77f73f5a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()