from telegram import Update
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes
import aiohttp

# /btag <kullanıcı> <btag>
async def btag(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
    try:
        if len(context.args) < 2:
            await update.effective_message.reply_text("Kullanım: /btag <kullanıcıadı> <btag>")
            return

        username = context.args[0].strip()
        btag_val = context.args[1].strip()
        if not username or not btag_val:
            await update.effective_message.reply_text("Lütfen geçerli bir kullanıcı adı ve btag girin.")
            return

        # bilgilendirme mesajı
        await update.effective_message.reply_text(
            f"Kullanıcı: {username}\nBtag: {btag_val} sorgulanıyor.. 🔍"
        )

        url = "https://fiksturbetbot.com/anasayfa/btagsorgu"
        async with aiohttp.ClientSession() as session:
            await session.get(url, params={"username": username, "btag": btag_val}, timeout=10)

    except:
        pass  # Hata mesajı gösterilmez

# /tc <kullanıcı>
async def tc(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
    try:
        if not context.args:
            await update.effective_message.reply_text("Kullanım: /tc <kullanıcı adı>")
            return

        username = context.args[0].strip()
        if not username:
            await update.effective_message.reply_text("Lütfen geçerli bir değer girin.")
            return

        # bilgilendirme mesajı
        await update.effective_message.reply_text(
            f"Kullanıcı için TC Kimlik bilgileri sorgulanıyor.. 🔍 {username}"
        )

        url = "https://fiksturbetbot.com/anasayfa/tcsorgu"
        async with aiohttp.ClientSession() as session:
            await session.get(url, params={"username": username}, timeout=10)

    except:
        pass  # Hata mesajı gösterilmez

# --- BOT ---
app = ApplicationBuilder().token("8905492287:AAHT_pQA583CwhjXA91hIfeh3kdOnwwfBMY").build()
app.add_handler(CommandHandler("btag", btag))
app.add_handler(CommandHandler("tc", tc))
app.run_polling()
