### Install and Run python-telegram-bot Source: https://python-telegram-bot.org/index These shell commands show how to install the python-telegram-bot library and run a Python bot script. The first command installs or upgrades the library to the latest stable version using pip. The second command executes your bot script. ```bash $ pip install python-telegram-bot --upgrade $ python bot.py ``` -------------------------------- ### Create a Telegram Bot with python-telegram-bot Source: https://python-telegram-bot.org/index This Python code snippet demonstrates how to build a basic Telegram bot using the python-telegram-bot library. It defines a handler for the '/hello' command which replies with a greeting to the user. Ensure you replace 'YOUR TOKEN HERE' with your actual bot token. ```python from telegram import Update from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes async def hello(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: await update.message.reply_text(f'Hello {update.effective_user.first_name}') app = ApplicationBuilder().token("YOUR TOKEN HERE").build() app.add_handler(CommandHandler("hello", hello)) app.run_polling() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.