import asyncio
from telegram import Bot
from config import TOKEN

async def main():
    bot = Bot(TOKEN)
    print("Mengirim permintaan ke bot... Kirimkan pesan ke grup target dalam 10 detik.")
    updates = await bot.get_updates(timeout=10)
    for update in updates:
        if update.message and update.message.chat.type in ["group", "supergroup"]:
            print(f"Nama Grup: {update.message.chat.title}")
            print(f"ID Grup: {update.message.chat.id}")
            print("Salin ID ini ke config.py\n")

asyncio.run(main())