Fixed bugs of /message and now using cached media
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
from os import remove, sep
|
||||
from typing import Literal
|
||||
from uuid import uuid1
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from datetime import datetime
|
||||
from app import app
|
||||
@@ -119,7 +117,7 @@ async def confirm_yes(app: Client, msg: Message, kind: Literal["application", "s
|
||||
else:
|
||||
sponsorship_content.append(f"{locale(f'question_{question}', 'message', 'sponsor_titles')} {tmp_sponsorship['sponsorship'][question]}")
|
||||
|
||||
await app.send_photo(chat_id=configGet("admin", "groups"), photo=tmp_sponsorship["sponsorship"]["proof"], caption=(locale("sponsor_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(sponsorship_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
await app.send_cached_media(chat_id=configGet("admin", "groups"), photo=tmp_sponsorship["sponsorship"]["proof"], caption=(locale("sponsor_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(sponsorship_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("sponsor_yes", "button")), callback_data=f"sponsor_yes_{holo_user.id}")
|
||||
|
@@ -43,6 +43,8 @@ async def any_stage(app: Client, msg: Message):
|
||||
photo=msg.photo,
|
||||
video=msg.video,
|
||||
file=msg.document,
|
||||
animation=msg.animation,
|
||||
voice=msg.voice,
|
||||
adm_origin=await isAnAdmin(context_message.from_user.id),
|
||||
adm_context=await isAnAdmin(msg.from_user.id)
|
||||
)
|
||||
|
Reference in New Issue
Block a user