async def pm_button(client, query): print(query) if not PM_PERMIT: return if query.from_user.id in AdminSettings and not re.match("engine_pm_apr", query.data) and not re.match("engine_pm_blk", query.data): await client.answer_callback_query(query.id, "No, you can't click by yourself. REEEEEEEEEEE.", show_alert=False) return if re.match("engine_pm_block", query.data): await app.send_sticker(query.from_user.id, sticker='CAADAgAD1QQAAp7kTAry1JrL3zVXSxYE') await setbot.edit_inline_text(query.from_user.id, "Sorry, No cash. Also you are getting reported to **SpamWatch**, OwO.") await app.block_user(query.from_user.id) elif re.match("engine_pm_nope", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.from_user.id, "Hello, please wait for a reply from my master, thank you") buttons = InlineKeyboardMarkup([[InlineKeyboardButton("Approve", callback_data=f"engine_pm_apr-{query.from_user.id}"), InlineKeyboardButton("Block", callback_data=f"engine_pm_blk-{query.from_user.id}")]]) pm_bot_mention = mention_markdown(query.from_user.id, query.from_user.first_name) pm_bot_message = f"[{OwnerName}](tg://user?id={Owner}), {pm_bot_mention} want to contact you~" await setbot.send_message(NOTIFY_ID, pm_bot_message,reply_markup=buttons) set_req(query.from_user.id, True) elif re.match("engine_pm_report", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.from_user.id, "Hello, if you want to report any bugs, please join @NanaBotSupport.") elif re.match("engine_pm_none", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.from_user.id, "Alright then,\nIf you want anything from me, please contact my again. Thank you") elif re.match("engine_pm_none", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.from_user.id, "Alright then, if you want anything from me, please contact my again. Thank you.") elif re.match("engine_pm_report_spam", query.data): await app.send_message(query.from_user.id, "Alright, please wait for my master's response for next steps. Thanks for submitting your spam report.") elif re.match("engine_pm_fban_appeal", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.inline_message_id, "Thanks for asking for a ban appeal. Please take that to @ThePinsTeam_FedSupport so other FedAdmins can take care of your case.\n\nIf you think you're banned on other places such as SpamWatch, please check their available support options first.") elif re.match("engine_pm_apr", query.data): target = query.data.split("-")[1] await query.message.edit_text(f"[Approved for PM]({target})") await app.send_message(target, "Hello, this is **Nana**, my master approved you to PM.") set_whitelist(int(target), True) elif re.match(r"engine_pm_blk", query.data): target = query.data.split("-")[1] await query.message.edit_text("Sed, that user was blocked.") await app.send_message(target, "Hello, this is **Nana**, my master has decide to block you. Sorry for this!") await app.block_user(target) else: await setbot.edit_inline_text(query.inline_message_id, "🙆")
async def pm_button(client, query): print(query) if not PM_PERMIT: return if query.from_user.id in AdminSettings and not re.match("engine_pm_apr", query.data) and not re.match("engine_pm_blk", query.data): await client.answer_callback_query(query.id, "No, you can't click by yourself", show_alert=False) return if re.match("engine_pm_block", query.data): await app.send_sticker(query.from_user.id, sticker='CAADAgAD1QQAAp7kTAry1JrL3zVXSxYE') await setbot.edit_inline_text(query.from_user.id, "Sorry, No cash.\nAlso you are getting reported to **SpamWatch**, OwO") await app.block_user(query.from_user.id) elif re.match("engine_pm_nope", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.from_user.id, "Hello, please wait for a reply from my master, thank you") buttons = InlineKeyboardMarkup([[InlineKeyboardButton("Approve", callback_data=f"engine_pm_apr-{query.from_user.id}"), InlineKeyboardButton("Block", callback_data=f"engine_pm_blk-{query.from_user.id}")]]) pm_bot_mention = mention_markdown(query.from_user.id, query.from_user.first_name) pm_bot_message = f"[{OwnerName}](tg://user?id={Owner}), {pm_bot_mention} want to contact you~" await setbot.send_message(NOTIFY_ID, pm_bot_message,reply_markup=buttons) set_req(query.from_user.id, True) elif re.match("engine_pm_report", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.from_user.id, "Hello, if you want to report any bugs, please vist in @NanaBotSupport") elif re.match("engine_pm_none", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message(query.from_user.id, "Alright then,\nIf you want anything from me, please contact my again. Thank you") elif re.match("engine_pm_apr", query.data): target = query.data.split("-")[1] await query.message.edit_text(f"[Approved for PM]({target})") await app.send_message(target, "Hello, this is **Nana**, my master approved you to PM.") set_whitelist(int(target), True) elif re.match(r"engine_pm_blk", query.data): target = query.data.split("-")[1] await query.message.edit_text("That user was blocked ~") await app.send_message(target, "Hello, this is **Nana**, my master has decide to block you.\nSorry for this!") await app.block_user(target) else: await setbot.edit_inline_text(query.inline_message_id, "🙆")
async def pm_button(client, query): if PM_PERMIT: if query.from_user.id in AdminSettings and not re.match( r"engine_pm_apr", query.data) and not re.match( r"engine_pm_blk", query.data): await client.answer_callback_query( query.id, "No, you can't click by yourself", show_alert=False) return if re.match(r"engine_pm_block", query.data): await setbot.edit_inline_text(query.inline_message_id, "💩") await app.send_message(query.from_user.id, "Opps, no nudes for you") await app.block_user(query.from_user.id) elif re.match(r"engine_pm_nope", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message( query.from_user.id, "Hello, please wait for a reply from my master, thank you") buttons = InlineKeyboardMarkup([[ InlineKeyboardButton( "Approve", callback_data=f"engine_pm_apr-{query.from_user.id}"), InlineKeyboardButton( "Block", callback_data=f"engine_pm_blk-{query.from_user.id}") ]]) pm_bot_mention = mention_markdown(query.from_user.id, query.from_user.first_name) pm_bot_message = f"[{OwnerName}](tg://user?id={Owner}), {pm_bot_mention} want to contact you~" await setbot.send_message(NOTIFY_ID, pm_bot_message, reply_markup=buttons) set_req(query.from_user.id, True) from nana.modules.lydia import lydia_status if lydia_status: await app.send_message( query.from_user.id, "During the wait for permission from my master, why do not we have a little chat?" ) elif re.match("engine_pm_report", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message( query.from_user.id, "Hello, if you want to report any bugs, please vist in @NanaBotSupport" ) elif re.match("engine_pm_none", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message( query.from_user.id, "Alright then,\nIf you want anything from me, please contact my again. Thank you" ) elif re.match("engine_pm_apr", query.data): target = query.data.split("-")[1] await query.message.edit_text(f"[Approved for PM]({target})") await app.send_message( target, "Hello, this is Nana, my master approved you to PM.") set_whitelist(int(target), True) elif re.match(r"engine_pm_blk", query.data): target = query.data.split("-")[1] await query.message.edit_text("That user was blocked~") await app.send_message( target, "Hello, this is Nana, my master has decide to block you.\nSorry for this!" ) await app.block_user(target) else: await setbot.edit_inline_text(query.inline_message_id, "🙆") else: return
async def pm_button(client, query): if query.from_user.id in AdminSettings and not re.match( r"engine_pm_apr", query.data) and not re.match( r"engine_pm_blk", query.data): await client.answer_callback_query(query.id, "No, you can't click by yourself", show_alert=False) return if re.match(r"engine_pm_block", query.data): await setbot.edit_inline_text(query.inline_message_id, "💩") # await app.send_message(query.from_user.id, "I dont share any hack or any illegal things, if you PM me for this, then you are retard and does not have a brain.\nContact your admin and ask that illegal things, not me\n\nGood bye you f*****g retard!") await app.block_user(query.from_user.id) elif re.match(r"engine_pm_nope", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message( query.from_user.id, "Hello, please wait for a reply from my master\nI've notify my master to reply your PM, thank you" ) FromUser = mention_markdown(query.from_user.id, query.from_user.first_name) await setbot.send_message( NOTIFY_ID, "Hi [ {} ](tg://user?id={}), {} want to contact you~".format( OwnerName, Owner, FromUser), reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("Approve", callback_data="engine_pm_apr-{}".format( query.from_user.id)), InlineKeyboardButton("Block", callback_data="engine_pm_blk-{}".format( query.from_user.id)) ]])) set_req(query.from_user.id, True) from nana.modules.lydia import lydia_status if lydia_status: await app.send_message( query.from_user.id, "During the wait for permission from my master, why do not we have a little chat?" ) elif re.match(r"engine_pm_report", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message( query.from_user.id, "Hello, if you want to report any bugs for my bots, please report in @NanaBotSupport\nThank you" ) elif re.match(r"engine_pm_none", query.data): await setbot.edit_inline_text(query.inline_message_id, "👍") await app.send_message( query.from_user.id, "Alright then,\nIf you want anything from me, please contact my again. Thank you" ) elif re.match(r"engine_pm_donate", query.data): await setbot.edit_inline_text(query.inline_message_id, "❤️") await app.send_message( query.from_user.id, "Cool, thank you for donate me\nYou can select payment in here https://ayrahikari.github.io/donations.html\n\nIf you've donated me, please PM me again, thanks" ) elif re.match(r"engine_pm_apr", query.data): target = query.data.split("-")[1] await query.message.edit_text("[Approved for PM]({})".format(target)) await app.send_message( target, "Hello, this is Nana, my master approved you to PM.") set_whitelist(int(target), True) elif re.match(r"engine_pm_blk", query.data): target = query.data.split("-")[1] await query.message.edit_text("That user was blocked~") await app.send_message( target, "Hello, this is Nana, my master has decide to block you.\nSorry for this!" ) await app.block_user(target) else: await setbot.edit_inline_text(query.inline_message_id, "🙆♀️")