Some changes to index and admin behavior
This commit is contained in:
parent
4075ddf4a3
commit
d1f2401f51
@ -1,3 +1,4 @@
|
||||
{
|
||||
"sent": []
|
||||
"sent": [],
|
||||
"captions": {}
|
||||
}
|
18
main.py
18
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))
|
||||
|
||||
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"))))
|
||||
|
||||
|
Reference in New Issue
Block a user