Closes #13
This commit is contained in:
@@ -68,23 +68,6 @@ async def callback_query_reject(app: Client, clb: CallbackQuery):
|
||||
await clb.message.edit(text=clb.message.text, reply_markup=InlineKeyboardMarkup(edited_markup))
|
||||
await clb.answer(text=locale("sub_rejected", "callback", locale=clb.from_user).format(holo_user.id), show_alert=True)
|
||||
|
||||
@app.on_callback_query(filters.regex("sub_aggressive_[\s\S]*"))
|
||||
async def callback_query_reject_aggressive(app: Client, clb: CallbackQuery):
|
||||
|
||||
fullclb = clb.data.split("_")
|
||||
holo_user = HoloUser(int(fullclb[2]))
|
||||
|
||||
await app.send_message(configGet("admin", "groups"), locale("rejected_by_agr", "message").format(clb.from_user.first_name, holo_user.id), disable_notification=True)
|
||||
await app.send_message(holo_user.id, locale("rejected_aggressive", "message", locale=holo_user))
|
||||
logWrite(f"User {holo_user.id} got rejected by {clb.from_user.id} due to being aggressive")
|
||||
|
||||
col_tmp.update_one({"user": {"$eq": holo_user.id}, "type": {"$eq": "application"}}, {"$set": {"state": "rejected", "sent": False}})
|
||||
|
||||
edited_markup = [[InlineKeyboardButton(text=str(locale("declined", "button")), callback_data="nothing")]]
|
||||
|
||||
await clb.message.edit(text=clb.message.text, reply_markup=InlineKeyboardMarkup(edited_markup))
|
||||
await clb.answer(text=locale("sub_aggressive", "callback", locale=clb.from_user).format(holo_user.id), show_alert=True)
|
||||
|
||||
@app.on_callback_query(filters.regex("sub_russian_[\s\S]*"))
|
||||
async def callback_query_reject_russian(app: Client, clb: CallbackQuery):
|
||||
|
||||
|
@@ -83,9 +83,6 @@ async def confirm_yes(app: Client, msg: Message, kind: Literal["application", "s
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("sub_no", "button")), callback_data=f"sub_no_{holo_user.id}")
|
||||
],
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("sub_aggressive", "button")), callback_data=f"sub_aggressive_{holo_user.id}")
|
||||
],
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("sub_russian", "button")), callback_data=f"sub_russian_{holo_user.id}")
|
||||
]
|
||||
|
Reference in New Issue
Block a user