mirror of
https://github.com/Xtao-Labs/sticker-captcha-bot.git
synced 2024-11-24 17:19:43 +00:00
fix: plugin load failed
This commit is contained in:
parent
6c2e9aed56
commit
4f0607c034
@ -6,8 +6,8 @@ from pyrogram import filters
|
|||||||
from pyrogram.enums import ChatMemberStatus
|
from pyrogram.enums import ChatMemberStatus
|
||||||
from pyrogram.types import ChatMemberUpdated
|
from pyrogram.types import ChatMemberUpdated
|
||||||
|
|
||||||
from plugins.languages import MSG_PUBLIC, ADMIN_MSG, MSG, VERIFY_TIME
|
|
||||||
from pyromod.utils.errors import TimeoutConversationError
|
from pyromod.utils.errors import TimeoutConversationError
|
||||||
|
from sticker.languages import MSG_PUBLIC, ADMIN_MSG, MSG, VERIFY_TIME
|
||||||
from sticker.scheduler import add_delete_message_job
|
from sticker.scheduler import add_delete_message_job
|
||||||
from sticker.service_message import ServiceMessage
|
from sticker.service_message import ServiceMessage
|
||||||
from sticker.single_utils import Client
|
from sticker.single_utils import Client
|
||||||
@ -68,7 +68,7 @@ async def invite(client: Client, chat_member_updated: ChatMemberUpdated):
|
|||||||
add_delete_message_job(msg)
|
add_delete_message_job(msg)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
msg = await client.send_message(chat.id, MSG % user.mention)
|
msg = await client.send_message(chat.id, MSG % (user.mention, user.mention))
|
||||||
except Exception:
|
except Exception:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
@ -4,7 +4,7 @@ from cashews import cache
|
|||||||
from pyrogram.types import ChatJoinRequest
|
from pyrogram.types import ChatJoinRequest
|
||||||
from pyrogram import filters
|
from pyrogram import filters
|
||||||
|
|
||||||
from plugins.languages import MSG, MSG_SUCCESS, MSG_FAILURE, VERIFY_TIME
|
from sticker.languages import MSG, MSG_SUCCESS, MSG_FAILURE, VERIFY_TIME
|
||||||
from sticker.single_utils import Client
|
from sticker.single_utils import Client
|
||||||
from sticker.scheduler import add_decline_request_job, rem_decline_request_job
|
from sticker.scheduler import add_decline_request_job, rem_decline_request_job
|
||||||
from sticker import bot, log
|
from sticker import bot, log
|
||||||
@ -21,7 +21,7 @@ async def new_member(client: Client, chat_join_request: ChatJoinRequest):
|
|||||||
try:
|
try:
|
||||||
with contextlib.suppress(Exception):
|
with contextlib.suppress(Exception):
|
||||||
await log(chat, user, "REQUEST")
|
await log(chat, user, "REQUEST")
|
||||||
await client.ask(user.id, MSG % chat.title, filters=filters.sticker, timeout=VERIFY_TIME)
|
await client.ask(user.id, MSG % (chat.title, chat.title), filters=filters.sticker, timeout=VERIFY_TIME)
|
||||||
with contextlib.suppress(Exception):
|
with contextlib.suppress(Exception):
|
||||||
await client.send_message(user.id, MSG_SUCCESS)
|
await client.send_message(user.id, MSG_SUCCESS)
|
||||||
await chat_join_request.approve()
|
await chat_join_request.approve()
|
||||||
|
@ -5,8 +5,8 @@ from pyrogram.enums import ChatMemberStatus
|
|||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from plugins.languages import RE_MSG, VERIFY_TIME
|
|
||||||
from pyromod.utils.errors import TimeoutConversationError
|
from pyromod.utils.errors import TimeoutConversationError
|
||||||
|
from sticker.languages import RE_MSG, VERIFY_TIME
|
||||||
from sticker.scheduler import add_delete_message_job
|
from sticker.scheduler import add_delete_message_job
|
||||||
from sticker.single_utils import Message, Client
|
from sticker.single_utils import Message, Client
|
||||||
from sticker import bot, log
|
from sticker import bot, log
|
||||||
@ -40,7 +40,7 @@ async def re_verify(client: Client, message: Message):
|
|||||||
with contextlib.suppress(Exception):
|
with contextlib.suppress(Exception):
|
||||||
await message.delete()
|
await message.delete()
|
||||||
try:
|
try:
|
||||||
msg = await message.reply_to_message.reply(RE_MSG % user.mention)
|
msg = await message.reply_to_message.reply(RE_MSG % (user.mention, user.mention))
|
||||||
except Exception as _:
|
except Exception as _:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user