mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 12:55:38 +00:00
💩 portball 错误修复
This commit is contained in:
parent
d296df8424
commit
5c0e3e5438
@ -152,7 +152,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "portball",
|
"name": "portball",
|
||||||
"version": "1.0",
|
"version": "1.1",
|
||||||
"section": "chat",
|
"section": "chat",
|
||||||
"maintainer": "丢失了",
|
"maintainer": "丢失了",
|
||||||
"size": "3.0 kb",
|
"size": "3.0 kb",
|
||||||
|
@ -6,7 +6,7 @@ from datetime import timedelta
|
|||||||
from telethon.tl.types import ChannelParticipantsAdmins
|
from telethon.tl.types import ChannelParticipantsAdmins
|
||||||
|
|
||||||
|
|
||||||
@listener(incoming=True, outgoing=True, command="portball",
|
@listener(is_plugin=True, outgoing=True, command="portball",
|
||||||
description="回复你要临时禁言的人的消息来实现XX秒的禁言。",
|
description="回复你要临时禁言的人的消息来实现XX秒的禁言。",
|
||||||
parameters="<理由> <时间 单位:秒>")
|
parameters="<理由> <时间 单位:秒>")
|
||||||
async def portball(context):
|
async def portball(context):
|
||||||
@ -18,6 +18,9 @@ async def portball(context):
|
|||||||
last_name = ''
|
last_name = ''
|
||||||
else:
|
else:
|
||||||
last_name = reply.sender.last_name
|
last_name = reply.sender.last_name
|
||||||
|
if not len(action) == 2:
|
||||||
|
await context.edit('你好蠢诶,没有参数我怎么禁言嘛。')
|
||||||
|
return
|
||||||
if int(action[1])<60:
|
if int(action[1])<60:
|
||||||
notification = await bot.send_message(context.chat_id, '诶呀不要小于60秒啦')
|
notification = await bot.send_message(context.chat_id, '诶呀不要小于60秒啦')
|
||||||
await sleep(10)
|
await sleep(10)
|
||||||
|
Loading…
Reference in New Issue
Block a user