mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-25 18:04:10 +00:00
🎨 群验证模块搜索消息时忽略入群消息
This commit is contained in:
parent
8c70f81562
commit
ad929209fc
@ -318,7 +318,8 @@ class GroupJoiningVerification(Plugin):
|
||||
if self.mtp is not None:
|
||||
from pyrogram.errors import BadRequest as MTPBadRequest, FloodWait as MTPFloodWait
|
||||
try:
|
||||
messages_list = await self.mtp.get_messages(chat.id, message_ids=[message.id, question_message.id])
|
||||
messages_list = await self.mtp.get_messages(chat.id,
|
||||
message_ids=[message.id + 1, question_message.id])
|
||||
for find_message in messages_list:
|
||||
if find_message.from_user.id == user.id:
|
||||
await self.mtp.delete_messages(chat_id=chat.id, message_ids=find_message.id)
|
||||
|
Loading…
Reference in New Issue
Block a user