mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 15:38:26 +00:00
parent
40d06a0c16
commit
63ffb39d99
@ -374,7 +374,6 @@ async def reply_set(context):
|
|||||||
async def auto_reply(context):
|
async def auto_reply(context):
|
||||||
if not redis_status():
|
if not redis_status():
|
||||||
return
|
return
|
||||||
global msg_rate, last_time
|
|
||||||
chat_id = context.chat_id
|
chat_id = context.chat_id
|
||||||
sender_id = context.sender_id
|
sender_id = context.sender_id
|
||||||
if chat_id < 0:
|
if chat_id < 0:
|
||||||
@ -402,8 +401,6 @@ async def auto_reply(context):
|
|||||||
if could_reply:
|
if could_reply:
|
||||||
read_context[context.id] = None
|
read_context[context.id] = None
|
||||||
await send_reply(chat_id, parse_multi(v), context)
|
await send_reply(chat_id, parse_multi(v), context)
|
||||||
elif context.id in read_context:
|
|
||||||
del read_context[context.id]
|
|
||||||
for k, v in regex_dict.items():
|
for k, v in regex_dict.items():
|
||||||
pattern = re.compile(k)
|
pattern = re.compile(k)
|
||||||
if pattern.search(send_text) and context.id not in read_context:
|
if pattern.search(send_text) and context.id not in read_context:
|
||||||
@ -424,5 +421,5 @@ async def auto_reply(context):
|
|||||||
v = v.replace("${regex_%s}" % group_name, capture_data)
|
v = v.replace("${regex_%s}" % group_name, capture_data)
|
||||||
count += 1
|
count += 1
|
||||||
await send_reply(chat_id, parse_multi(v), context)
|
await send_reply(chat_id, parse_multi(v), context)
|
||||||
elif context.id in read_context:
|
if context.id in read_context:
|
||||||
del read_context[context.id]
|
del read_context[context.id]
|
||||||
|
@ -362,10 +362,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword",
|
"name": "keyword",
|
||||||
"version": "2.02",
|
"version": "2.03",
|
||||||
"section": "chat",
|
"section": "chat",
|
||||||
"maintainer": "c3b2a",
|
"maintainer": "c3b2a",
|
||||||
"size": "17.4 kb",
|
"size": "17.3 kb",
|
||||||
"supported": true,
|
"supported": true,
|
||||||
"des-short": "群组关键词自动回复插件",
|
"des-short": "群组关键词自动回复插件",
|
||||||
"des": "命令: keyword, replyset。"
|
"des": "命令: keyword, replyset。"
|
||||||
|
Loading…
Reference in New Issue
Block a user