diff --git a/data/index.json b/data/index.json index d1e00c8..2af118e 100644 --- a/data/index.json +++ b/data/index.json @@ -1,3 +1,4 @@ { - "sent": [] + "sent": [], + "captions": {} } \ No newline at end of file diff --git a/main.py b/main.py index df77526..18a1703 100644 --- a/main.py +++ b/main.py @@ -227,12 +227,6 @@ def get_submission(_, msg): buttons = [ [ InlineKeyboardButton(text=locale("sub_yes", "button", locale=configGet("locale")), callback_data=f"sub_yes_{msg.from_user.id}_{msg.id}") - ], - [ - InlineKeyboardButton(text=locale("sub_block", "button", locale=configGet("locale")), callback_data=f"sub_block_{msg.from_user.id}") - ], - [ - InlineKeyboardButton(text=locale("sub_unblock", "button", locale=configGet("locale")), callback_data=f"sub_unblock_{msg.from_user.id}") ] ] @@ -262,8 +256,20 @@ def get_submission(_, msg): caption += f" ({msg.from_user.phone_number})" msg.copy(configGet("admin", "reports"), caption=caption, reply_markup=InlineKeyboardMarkup(buttons)) - msg.reply_text(locale("sub_sent", "message", locale=user_locale), quote=True) - subLimit(msg.from_user) + + if msg.from_user.id != configGet("admin", "reports"): + buttons += [ + [ + InlineKeyboardButton(text=locale("sub_block", "button", locale=configGet("locale")), callback_data=f"sub_block_{msg.from_user.id}") + ], + [ + InlineKeyboardButton(text=locale("sub_unblock", "button", locale=configGet("locale")), callback_data=f"sub_unblock_{msg.from_user.id}") + ] + ] + + msg.reply_text(locale("sub_sent", "message", locale=user_locale), quote=True) + subLimit(msg.from_user) + else: msg.reply_text(locale("sub_cooldown", "message", locale=user_locale).format(str(configGet("timeout", "submission"))))