async def ok(event): pro = await bot.get_me() boy = pro.id if not event.sender_id == boy: return if event.sender_id == boy: msg = await event.get_reply_message() user_id, reply_message_id = his_userid(msg.id) if is_he_added(user_id): await event.reply("Already Blacklisted") elif not is_he_added(user_id): add_nibba_in_db(user_id) await event.reply("Blacklisted This Dumb Person") await xbot.send_message( user_id, "You Have Been Blacklisted And You Can't Message My Master Now.")
async def gey(event): pro = await bot.get_me() boy = pro.id if not event.sender_id == boy: return if event.sender_id == boy: msg = await event.get_reply_message() msg.id event.raw_text user_id, reply_message_id = his_userid(msg.id) if not is_he_added(user_id): await event.reply("Not Even. Blacklisted🚶") elif is_he_added(user_id): removenibba(user_id) await event.reply("DisBlacklisted This Dumb Person") await xbot.send_message( user_id, "Congo! You Have Been Unblacklisted By My Master.")
async def all_messages_catcher(event): if is_he_added(event.sender_id): return if event.is_group or event.sender_id == bot.me.id or event.sender_id == id: return if event.raw_text.startswith("/"): return if os.environ.get("SUB_TO_MSG_ASSISTANT", False): try: result = await xbot( functions.channels.GetParticipantRequest( channel=Config.JTM_CHANNEL_ID, user_id=event.sender_id)) except telethon.errors.rpcerrorlist.UserNotParticipantError: await event.reply( f"**Opps, I Couldn't Forward That Message To Owner. Please Join My Channel First And Then Try Again!**", buttons=[ Button.url("Join Channel", Config.JTM_CHANNEL_USERNAME) ]) return await event.get_sender() sed = await event.forward_to(bot.uid) add_me_in_db(sed.id, event.sender_id, event.id)