├── config.py ├── __pycache__ └── config.cpython-310.pyc └── main.py /config.py: -------------------------------------------------------------------------------- 1 | BOT_TOKEN = "8429353678:AAEBVXiA5SmdRJvFhyrQLICdpbmPyX_KbgA" 2 | 3 | # 1002420103214 -------------------------------------------------------------------------------- /__pycache__/config.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HumoyunMamasodiqov/guruh-idbot/HEAD/__pycache__/config.cpython-310.pyc -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from telegram import Update 2 | from telegram.ext import Application, MessageHandler, filters, ContextTypes 3 | 4 | 5 | TOKEN = "8443725643:AAFgF-M2BLKFkqwPaPyGBqANAbYbwWhODYI" 6 | 7 | 8 | async def get_group_id(update: Update, context: ContextTypes.DEFAULT_TYPE): 9 | chat = update.effective_chat 10 | if chat: 11 | chat_id = chat.id 12 | await update.effective_message.reply_text(f"Guruh yoki kanal ID: {chat_id}") 13 | else: 14 | await update.effective_message.reply_text("Chat topilmadi ❌") 15 | 16 | def main(): 17 | app = Application.builder().token(TOKEN).build() 18 | 19 | 20 | app.add_handler(MessageHandler(filters.ALL, get_group_id)) 21 | 22 | print("Bot ishga tushdi...") 23 | app.run_polling() 24 | 25 | if __name__ == "__main__": 26 | main() 27 | --------------------------------------------------------------------------------