(client, message)
| 54 | |
| 55 | @Client.on_message(filters.command("start") & filters.incoming) |
| 56 | async def start(client, message): |
| 57 | username = client.me.username |
| 58 | if not await db.is_user_exist(message.from_user.id): |
| 59 | await db.add_user(message.from_user.id, message.from_user.first_name) |
| 60 | await client.send_message(LOG_CHANNEL, script.LOG_TEXT.format(message.from_user.id, message.from_user.mention)) |
| 61 | if len(message.command) != 2: |
| 62 | buttons = [[ |
| 63 | InlineKeyboardButton('💝 sᴜʙsᴄʀɪʙᴇ ᴍʏ ʏᴏᴜᴛᴜʙᴇ ᴄʜᴀɴɴᴇʟ', url='https://youtube.com/@Tech_VJ') |
| 64 | ],[ |
| 65 | InlineKeyboardButton('🔍 sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ', url='https://t.me/vj_bot_disscussion'), |
| 66 | InlineKeyboardButton('🤖 ᴜᴘᴅᴀᴛᴇ ᴄʜᴀɴɴᴇʟ', url='https://t.me/vj_bots') |
| 67 | ],[ |
| 68 | InlineKeyboardButton('💁♀️ ʜᴇʟᴘ', callback_data='help'), |
| 69 | InlineKeyboardButton('😊 ᴀʙᴏᴜᴛ', callback_data='about') |
| 70 | ]] |
| 71 | if CLONE_MODE == True: |
| 72 | buttons.append([InlineKeyboardButton('🤖 ᴄʀᴇᴀᴛᴇ ʏᴏᴜʀ ᴏᴡɴ ᴄʟᴏɴᴇ ʙᴏᴛ', callback_data='clone')]) |
| 73 | reply_markup = InlineKeyboardMarkup(buttons) |
| 74 | me = client.me |
| 75 | await message.reply_photo( |
| 76 | photo=random.choice(PICS), |
| 77 | caption=script.START_TXT.format(message.from_user.mention, me.mention), |
| 78 | reply_markup=reply_markup |
| 79 | ) |
| 80 | return |
| 81 | |
| 82 | # Don't Remove Credit Tg - @VJ_Bots |
| 83 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ |
| 84 | # Ask Doubt on telegram @KingVJ01 |
| 85 | |
| 86 | data = message.command[1] |
| 87 | try: |
| 88 | pre, file_id = data.split('_', 1) |
| 89 | except: |
| 90 | file_id = data |
| 91 | pre = "" |
| 92 | if data.split("-", 1)[0] == "verify": |
| 93 | userid = data.split("-", 2)[1] |
| 94 | token = data.split("-", 3)[2] |
| 95 | if str(message.from_user.id) != str(userid): |
| 96 | return await message.reply_text( |
| 97 | text="<b>Invalid link or Expired link !</b>", |
| 98 | protect_content=True |
| 99 | ) |
| 100 | is_valid = await check_token(client, userid, token) |
| 101 | if is_valid == True: |
| 102 | await message.reply_text( |
| 103 | text=f"<b>Hey {message.from_user.mention}, You are successfully verified !\nNow you have unlimited access for all files till today midnight.</b>", |
| 104 | protect_content=True |
| 105 | ) |
| 106 | await verify_user(client, userid, token) |
| 107 | else: |
| 108 | return await message.reply_text( |
| 109 | text="<b>Invalid link or Expired link !</b>", |
| 110 | protect_content=True |
| 111 | ) |
| 112 | elif data.split("-", 1)[0] == "BATCH": |
| 113 | try: |
nothing calls this directly
no test coverage detected