fix: plugin load failed

This commit is contained in:
xtaodada 2024-01-22 21:06:47 +08:00
parent 6c2e9aed56
commit 4f0607c034
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
4 changed files with 6 additions and 6 deletions

View File

@ -6,8 +6,8 @@ from pyrogram import filters
from pyrogram.enums import ChatMemberStatus
from pyrogram.types import ChatMemberUpdated
from plugins.languages import MSG_PUBLIC, ADMIN_MSG, MSG, VERIFY_TIME
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.service_message import ServiceMessage
from sticker.single_utils import Client
@ -68,7 +68,7 @@ async def invite(client: Client, chat_member_updated: ChatMemberUpdated):
add_delete_message_job(msg)
return
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:
return
try:

View File

@ -4,7 +4,7 @@ from cashews import cache
from pyrogram.types import ChatJoinRequest
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.scheduler import add_decline_request_job, rem_decline_request_job
from sticker import bot, log
@ -21,7 +21,7 @@ async def new_member(client: Client, chat_join_request: ChatJoinRequest):
try:
with contextlib.suppress(Exception):
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):
await client.send_message(user.id, MSG_SUCCESS)
await chat_join_request.approve()

View File

@ -5,8 +5,8 @@ from pyrogram.enums import ChatMemberStatus
from datetime import datetime, timedelta
from plugins.languages import RE_MSG, VERIFY_TIME
from pyromod.utils.errors import TimeoutConversationError
from sticker.languages import RE_MSG, VERIFY_TIME
from sticker.scheduler import add_delete_message_job
from sticker.single_utils import Message, Client
from sticker import bot, log
@ -40,7 +40,7 @@ async def re_verify(client: Client, message: Message):
with contextlib.suppress(Exception):
await message.delete()
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 _:
return
try: