From 4f0607c034b0693269f98e07cb4ea5e3483eafef Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 22 Jan 2024 21:06:47 +0800 Subject: [PATCH] fix: plugin load failed --- plugins/chat_member_update.py | 4 ++-- plugins/new_member.py | 4 ++-- plugins/reverify.py | 4 ++-- {plugins => sticker}/languages.py | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename {plugins => sticker}/languages.py (100%) diff --git a/plugins/chat_member_update.py b/plugins/chat_member_update.py index ac69722..f6f4146 100644 --- a/plugins/chat_member_update.py +++ b/plugins/chat_member_update.py @@ -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: diff --git a/plugins/new_member.py b/plugins/new_member.py index bd18d0f..c220dc4 100644 --- a/plugins/new_member.py +++ b/plugins/new_member.py @@ -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() diff --git a/plugins/reverify.py b/plugins/reverify.py index bfd8a21..ec0440d 100644 --- a/plugins/reverify.py +++ b/plugins/reverify.py @@ -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: diff --git a/plugins/languages.py b/sticker/languages.py similarity index 100% rename from plugins/languages.py rename to sticker/languages.py