mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 07:46:33 +00:00
批量修复错误
This commit is contained in:
parent
1ed1c31166
commit
4478768bc9
@ -209,7 +209,10 @@ async def process_message(context):
|
||||
reply_user_id = 0
|
||||
link = process_link(context.chat_id, context.id)
|
||||
me = await context.client.get_me()
|
||||
reply = await context.get_reply_message()
|
||||
try:
|
||||
reply = await context.get_reply_message()
|
||||
except ValueError:
|
||||
return
|
||||
try:
|
||||
reply_user_id = reply.sender.id
|
||||
if context.sticker:
|
||||
|
4
da.py
4
da.py
@ -32,8 +32,8 @@ async def da(context):
|
||||
await log(f"批量删除了 {str(count)} 条消息。")
|
||||
try:
|
||||
notification = await send_prune_notify(context, count)
|
||||
except PeerFloodError:
|
||||
pass
|
||||
except:
|
||||
return
|
||||
await sleep(.5)
|
||||
await notification.delete()
|
||||
|
||||
|
6
eat.py
6
eat.py
@ -51,7 +51,11 @@ async def eat(context):
|
||||
await context.edit("正在生成 吃头像 图片中 . . .")
|
||||
if context.reply_to_msg_id:
|
||||
reply_message = await context.get_reply_message()
|
||||
user_id = reply_message.sender_id
|
||||
try:
|
||||
user_id = reply_message.sender_id
|
||||
except AttributeError:
|
||||
await context.edit("出错了呜呜呜 ~ 无效的参数。")
|
||||
return
|
||||
target_user = await context.client(GetFullUserRequest(user_id))
|
||||
if len(context.parameter) == 1:
|
||||
diu_round = True
|
||||
|
12
list.json
12
list.json
@ -152,7 +152,7 @@
|
||||
},
|
||||
{
|
||||
"name": "portball",
|
||||
"version": "1.45",
|
||||
"version": "1.451",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "2.8 kb",
|
||||
@ -202,7 +202,7 @@
|
||||
},
|
||||
{
|
||||
"name": "eat",
|
||||
"version": "1.03",
|
||||
"version": "1.031",
|
||||
"section": "profile",
|
||||
"maintainer": "SF_PICK",
|
||||
"size": "6.4 kb",
|
||||
@ -242,7 +242,7 @@
|
||||
},
|
||||
{
|
||||
"name": "da",
|
||||
"version": "1.02",
|
||||
"version": "1.021",
|
||||
"section": "chat",
|
||||
"maintainer": "yxkumad",
|
||||
"size": "1.6 kb",
|
||||
@ -312,7 +312,7 @@
|
||||
},
|
||||
{
|
||||
"name": "videodl",
|
||||
"version": "0.12",
|
||||
"version": "0.121",
|
||||
"section": "daily",
|
||||
"maintainer": "TNTcraftHIM",
|
||||
"size": "5.3 kb",
|
||||
@ -372,7 +372,7 @@
|
||||
},
|
||||
{
|
||||
"name": "autoreplysticker",
|
||||
"version": "1.23",
|
||||
"version": "1.231",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "12 kb",
|
||||
@ -702,7 +702,7 @@
|
||||
},
|
||||
{
|
||||
"name": "yvlu",
|
||||
"version": "1.12",
|
||||
"version": "1.121",
|
||||
"section": "chat",
|
||||
"maintainer": "xtaodada",
|
||||
"size": "4.8 kb",
|
||||
|
11
portball.py
11
portball.py
@ -32,6 +32,17 @@ async def portball(context):
|
||||
except:
|
||||
pass
|
||||
return False
|
||||
try:
|
||||
int(action[1])
|
||||
except ValueError:
|
||||
notification = await bot.send_message(context.chat_id, '格式是\n-portball 理由 秒数\n真蠢', reply_to=context.id)
|
||||
await sleep(10)
|
||||
await notification.delete()
|
||||
try:
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
return False
|
||||
if int(action[1]) < 60:
|
||||
notification = await bot.send_message(context.chat_id, '诶呀不要小于60秒啦', reply_to=context.id)
|
||||
await sleep(10)
|
||||
|
@ -39,7 +39,11 @@ async def vdl(context):
|
||||
'uninstall pytube3 -y` 进行卸载')
|
||||
return
|
||||
url = url.replace('www.youtube.com/watch?v=', 'youtu.be/')
|
||||
if not await youtube_dl(url, context, reply_id):
|
||||
try:
|
||||
if not await youtube_dl(url, context, reply_id):
|
||||
await context.edit("出错了呜呜呜 ~ 视频下载失败。")
|
||||
sleep(3)
|
||||
except:
|
||||
await context.edit("出错了呜呜呜 ~ 视频下载失败。")
|
||||
sleep(3)
|
||||
await log(f"已拉取 YouTube 视频,地址: {url}.")
|
||||
|
6
yvlu.py
6
yvlu.py
@ -185,7 +185,11 @@ async def yv_lu(context):
|
||||
image = await resize_image('plugins/yvlu/result.png', 512)
|
||||
file = BytesIO()
|
||||
file.name = "sticker.webp"
|
||||
image.save(file, "WEBP")
|
||||
try:
|
||||
image.save(file, "WEBP")
|
||||
except KeyError:
|
||||
await context.delete()
|
||||
return
|
||||
file.seek(0)
|
||||
await context.client.send_file(
|
||||
context.chat_id,
|
||||
|
Loading…
Reference in New Issue
Block a user