mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 00:35:36 +00:00
neteasedown rape 修复错误
This commit is contained in:
parent
fd0ea183c2
commit
5c04749c37
@ -272,7 +272,7 @@
|
||||
},
|
||||
{
|
||||
"name": "neteasedown",
|
||||
"version": "1.222",
|
||||
"version": "1.223",
|
||||
"section": "daily",
|
||||
"maintainer": "xtaodada",
|
||||
"size": "11.4 kb",
|
||||
@ -472,7 +472,7 @@
|
||||
},
|
||||
{
|
||||
"name": "rape",
|
||||
"version": "1.031",
|
||||
"version": "1.032",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "4.0 kb",
|
||||
|
@ -213,13 +213,13 @@ async def ned(context):
|
||||
# 搜索歌曲
|
||||
# 判断是否使用最高比特率解析
|
||||
flac_mode = True if context.arguments.find("-f") != -1 else False
|
||||
song_id = context.arguments.replace("-f", "").strip()
|
||||
song_id = context.arguments.replace("-f", "").replace("\u200b", "").strip()
|
||||
# id
|
||||
if song_id.isdigit():
|
||||
song_id = int(song_id)
|
||||
else:
|
||||
search_data = apis.cloudsearch.GetSearchResult(song_id, CloudSearchType(1), 1)
|
||||
if len(search_data["result"]["songs"]) == 1:
|
||||
if search_data["result"]["songCount"] >= 1:
|
||||
song_id = search_data["result"]["songs"][0]["id"]
|
||||
else:
|
||||
await context.edit(f"**没有找到歌曲**,请检查歌曲名称是否正确。")
|
||||
|
3
rape.py
3
rape.py
@ -39,6 +39,9 @@ async def rape(context):
|
||||
except ChatAdminRequiredError:
|
||||
await context.edit('无管理员权限。')
|
||||
return
|
||||
except:
|
||||
await context.edit('无法踢出。')
|
||||
return
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{reply.sender.first_name} {reply_last_name}](tg://user?id={reply.sender.id}) 已被移出群聊',
|
||||
|
Loading…
Reference in New Issue
Block a user