Saturday, August 2, 2025

5.(command:/chack)



5.(command:/chack)


/chack




def check():
    channels = [
        '@Earningv3', '@Earningv3', '@Earningv3', '@Earningv3',
    ]

    for channel in channels:
        membership_status = bot.getChatMember(channel, u)
        if membership_status.status == 'left':
            return False
    return True


if check():
    keyboard = ReplyKeyboardMarkup(True)
    keyboard.row("🖥️ Account", "⚡ Referral")
    keyboard.row("💳 Wallet", "💲 Withdrawal")
    keyboard.row("SUPPORT 💸")
    keyboard.row("📊 Status")

    bot.replyText(
        chat_id=message.chat.id,
        text="🎉 Welcome to the main menu. You can now use this bot.",
        reply_markup=keyboard,
        parse_mode="markdown"
    )

    refer = User.getData("refer")
    bonus_given = User.getData("ref_bonus")

    if refer is not None and bonus_given is None:
        bot.replyText(
            chat_id=refer,
            text="💰 You have received 1 টাকা for referring a new user.",
            parse_mode="markdown"
        )

        ref_balance = int(User.getData("balance", user=refer)) + 1
        User.saveData("balance", ref_balance, user=refer)

        ref_count = int(User.getData("ref_count", user=refer)) + 1
        User.saveData("ref_count", ref_count, user=refer)

        User.saveData("ref_bonus", True)
else:
    bot.replyText(
        chat_id=u,
        text="❌ You need to join all our channels first.",
        parse_mode="markdown"
    )
 

No comments:

Post a Comment

  13.(commamnd:/account) / accoun t balance = str(User.getData("balance")) wallet = str(User.getData('wallet')) user = str...