Skip to content

Commit

Permalink
🐛 parse_mode changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
AirportR committed May 13, 2024
1 parent 8e7b3d3 commit 03f188a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions botmodule/command/submanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import pyrogram.types
from pyrogram.errors import RPCError
from loguru import logger
from pyrogram.types import Message
from pyrogram.enums import ParseMode

from utils import check, cleaner
from botmodule.init_bot import config, admin
from utils.check import check_user, get_telegram_id_from_message
Expand Down Expand Up @@ -74,7 +77,7 @@ async def sub_invite(_, message: pyrogram.types.Message):
# print(r)


async def sub(_, message):
async def sub(_, message: "Message"):
ID = get_telegram_id_from_message(message)
arg = cleaner.ArgCleaner().getall(str(message.text))
try:
Expand All @@ -90,11 +93,11 @@ async def sub(_, message):
subowner = subinfo.get('owner', '')
if await check_user(message, admin, isalert=False):
# 管理员至高权限
await message.reply(str(subinfo.get('url', '')))
await message.reply(str(subinfo.get('url', '')), parse_mode=ParseMode.DISABLED)
return
if subowner and subowner == ID:
if hashlib.sha256(pwd.encode("utf-8")).hexdigest() == subpwd:
await message.reply(str(subinfo.get('url', '')))
await message.reply(str(subinfo.get('url', '')), )
else:
m2 = await message.reply("❌密码错误,请检查后重试")
await asyncio.sleep(5)
Expand Down

0 comments on commit 03f188a

Please sign in to comment.