from telegram import Update
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes
import requests


async  def saatlik_deposit(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
    await update.message.reply_text(f'Raporunuzu hazırlıyorum, lütfen bekleyin {update.effective_user.first_name} Bey')
    url = "https://telegram.gazibetbonus.com/anasayfa/saatlik_deposit"
    r = requests.get(url)


async  def gunsonu(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
    await update.message.reply_text(f'Raporunuzu hazırlıyorum, lütfen bekleyin {update.effective_user.first_name} Bey')
    url = "https://telegram.gazibetbonus.com/anasayfa/gunluksorgu"
    r = requests.get(url)

    
async  def tc(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
    print("hello")
    """Add a job to the queue."""
    chat_id = update.effective_message.chat_id
    try:
        # args[0] should contain the time for the timer in seconds
        username = len(context.args[0])
        if username <= 0:
            await update.effective_message.reply_text("Lütfen geçerli bir değer girin.")
            return
        await update.message.reply_text(f'Kullanıcı için TC Kimlik bilgileri sorgulanıyor.. 🔍'+str(context.args[0]))
        url = "https://telegram.gazibetbonus.com/anasayfa/tcsorgu?username="+str(context.args[0])
        r = requests.get(url)
        

    except (IndexError, ValueError):
        await update.effective_message.reply_text("Kullanım: /tc <kullanıcı adı>")

app = ApplicationBuilder().token("8013929818:AAFPyr_h0nBapKdCjY6_uc5ZuKGddBSoVF4").build()

app.add_handler(CommandHandler("rapor", saatlik_deposit))

app.add_handler(CommandHandler("gunsonu", gunsonu))

app.add_handler(CommandHandler("tc", tc))

app.run_polling()
