Untitled

mail@pastecode.io avatar
unknown
plain_text
24 days ago
513 B
0
Indexable
Never
from telegram.ext import Updater, CommandHandler

# Обработчик команды /start
def start(update, context):
    context.bot.send_message(chat_id=update.effective_chat.id, text="Привет! Я бот.")

def main():
    # Токен вашего бота
    token = 'YOUR_BOT_TOKEN'
    updater = Updater(token, use_context=True)

    dp = updater.dispatcher
    dp.add_handler(CommandHandler("start", start))

    updater.start_polling()
    updater.idle()

if __name__ == '__main__':
    main()
Leave a Comment