This commit closes #9
This commit is contained in:
@@ -40,9 +40,9 @@ async def callback_query_yes(app: PosterClient, clb: CallbackQuery):
|
||||
)
|
||||
return
|
||||
|
||||
if submission is not None:
|
||||
await submission.reply_text(
|
||||
locale("sub_yes", "message", locale=submission.from_user.language_code),
|
||||
if submission[0] is not None:
|
||||
await submission[0].reply_text(
|
||||
locale("sub_yes", "message", locale=submission[0].from_user.language_code),
|
||||
quote=True,
|
||||
)
|
||||
elif db_entry is not None:
|
||||
@@ -73,6 +73,12 @@ async def callback_query_yes(app: PosterClient, clb: CallbackQuery):
|
||||
]
|
||||
]
|
||||
)
|
||||
|
||||
if configGet("send_uploaded_id", "submission"):
|
||||
await clb.message.edit_caption(
|
||||
clb.message.caption + f"\n\nID: `{submission[1]}`"
|
||||
)
|
||||
|
||||
await clb.message.edit_reply_markup(
|
||||
reply_markup=InlineKeyboardMarkup(edited_markup)
|
||||
)
|
||||
|
@@ -188,12 +188,14 @@ async def get_submission(app: PosterClient, msg: Message):
|
||||
and configGet("admins", "submission", "require_confirmation") is False
|
||||
):
|
||||
try:
|
||||
await app.submit_photo(str(inserted.inserted_id))
|
||||
submitted = await app.submit_photo(str(inserted.inserted_id))
|
||||
await msg.reply_text(
|
||||
locale("sub_yes_auto", "message", locale=user_locale),
|
||||
disable_notification=True,
|
||||
quote=True,
|
||||
)
|
||||
if configGet("send_uploaded_id", "submission"):
|
||||
caption += f"\n\nID: `{submitted[1]}`"
|
||||
await msg.copy(app.owner, caption=caption, disable_notification=True)
|
||||
return
|
||||
except SubmissionDuplicatesError as exp:
|
||||
@@ -212,12 +214,14 @@ async def get_submission(app: PosterClient, msg: Message):
|
||||
and configGet("users", "submission", "require_confirmation") is False
|
||||
):
|
||||
try:
|
||||
await app.submit_photo(str(inserted.inserted_id))
|
||||
submitted = await app.submit_photo(str(inserted.inserted_id))
|
||||
await msg.reply_text(
|
||||
locale("sub_yes_auto", "message", locale=user_locale),
|
||||
disable_notification=True,
|
||||
quote=True,
|
||||
)
|
||||
if configGet("send_uploaded_id", "submission"):
|
||||
caption += f"\n\nID: `{submitted[1]}`"
|
||||
await msg.copy(app.owner, caption=caption)
|
||||
return
|
||||
except SubmissionDuplicatesError as exp:
|
||||
|
Reference in New Issue
Block a user