mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fix notes and filters for old data
This commit is contained in:
parent
67ee4d677f
commit
bc104e8915
2 changed files with 15 additions and 15 deletions
|
|
@ -169,9 +169,9 @@ async def filters_re(_, message):
|
|||
pattern = r"( |^|[^\w])" + re.escape(word) + r"( |$|[^\w])"
|
||||
if re.search(pattern, text, flags=re.IGNORECASE):
|
||||
_filter = await get_filter(chat_id, word)
|
||||
data_type = _filter["type"]
|
||||
data = _filter["data"]
|
||||
file_id = _filter["file_id"]
|
||||
data_type = _filter.get("type")
|
||||
data = _filter.get("data")
|
||||
file_id = _filter.get("file_id")
|
||||
keyb = None
|
||||
if data:
|
||||
if re.findall(r"\[.+\,.+\]", data):
|
||||
|
|
|
|||
|
|
@ -146,9 +146,9 @@ async def get_one_note(self, message):
|
|||
self.log.info(_note)
|
||||
if not _note:
|
||||
return
|
||||
type = _note["type"]
|
||||
data = _note["data"]
|
||||
file_id = _note["file_id"]
|
||||
type_ = _note.get("type")
|
||||
data = _note.get("data")
|
||||
file_id = _note.get("file_id")
|
||||
keyb = None
|
||||
if data:
|
||||
if findall(r"\[.+\,.+\]", data):
|
||||
|
|
@ -159,51 +159,51 @@ async def get_one_note(self, message):
|
|||
if replied_message:
|
||||
if replied_message.from_user.id != message.from_user.id:
|
||||
message = replied_message
|
||||
if type == "text":
|
||||
if type_ == "text":
|
||||
await message.reply_text(
|
||||
text=data,
|
||||
reply_markup=keyb,
|
||||
disable_web_page_preview=True,
|
||||
)
|
||||
if type == "sticker":
|
||||
if type_ == "sticker":
|
||||
await message.reply_sticker(
|
||||
sticker=file_id,
|
||||
)
|
||||
if type == "animation":
|
||||
if type_ == "animation":
|
||||
await message.reply_animation(
|
||||
animation=file_id,
|
||||
caption=data,
|
||||
reply_markup=keyb,
|
||||
)
|
||||
if type == "photo":
|
||||
if type_ == "photo":
|
||||
await message.reply_photo(
|
||||
photo=file_id,
|
||||
caption=data,
|
||||
reply_markup=keyb,
|
||||
)
|
||||
if type == "document":
|
||||
if type_ == "document":
|
||||
await message.reply_document(
|
||||
document=file_id,
|
||||
caption=data,
|
||||
reply_markup=keyb,
|
||||
)
|
||||
if type == "video":
|
||||
if type_ == "video":
|
||||
await message.reply_video(
|
||||
video=file_id,
|
||||
caption=data,
|
||||
reply_markup=keyb,
|
||||
)
|
||||
if type == "video_note":
|
||||
if type_ == "video_note":
|
||||
await message.reply_video_note(
|
||||
video_note=file_id,
|
||||
)
|
||||
if type == "audio":
|
||||
if type_ == "audio":
|
||||
await message.reply_audio(
|
||||
audio=file_id,
|
||||
caption=data,
|
||||
reply_markup=keyb,
|
||||
)
|
||||
if type == "voice":
|
||||
if type_ == "voice":
|
||||
await message.reply_voice(
|
||||
voice=file_id,
|
||||
caption=data,
|
||||
|
|
|
|||
Loading…
Reference in a new issue