import telebot import pyotp YAHYA = '6443466995:AAFJolbyCYIhUTizGqrIEq49FZgzuZ7cb9o' bot = telebot.TeleBot(YAHYA) def generate_otp(secret_key): totp = pyotp.TOTP(secret_key) return totp.now() @bot.message_handler(commands=['start']) def send_otp(message): bot.reply_to(message, "Silakan masukkan secret key untuk menghasilkan OTP") @bot.message_handler(func=lambda message: True) def process_secret_key(message): secret_key = message.text.strip() secret_key = secret_key.replace(" ", "") try: KNTL = generate_otp(secret_key) bot.reply_to(message, f"Kode OTP Anda adalah: {KNTL}") except Exception as e: bot.reply_to(message, "Kunci rahasia yang dimasukkan tidak valid. Mohon masukkan kunci rahasia yang benar.") #print("yahya ganteng gocap nya dong.....") bot.polling()