Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import telebot
- bot = telebot.TeleBot('1035343075:AAF_AvF7iCP20BqCk01kFjwqc0xspBZ8ix4')
- @bot.message_handler(commands=['start', 'hello'])
- def start_message(message):
- bot.send_message(message.chat.id, 'Привет, ты написал мне /start')
- @bot.message_handler(func=lambda message: True)
- def goodbye_message(message):
- msg = message.text.lower()
- print(msg)
- if msg == 'пока':
- bot.send_message(message.chat.id, 'ПОКА')
- else:
- bot.send_message(message.chat.id, f'САМ ТЫ {msg.upper()}')
- bot.polling()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement