Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import telebot
- bot = telebot.TeleBot('здесь мой токен')
- @bot.message_handler(commands=['start'])
- def start_message(message):
- bot.send_message(message.chat.id, 'Привет, ты написал мне /start')
- @bot.message_handler(content_types=['text'])
- def send_text(message):
- if message.text.lower() == 'привет':
- bot.send_message(message.chat.id, 'Привет, создатель')
- elif message.text.lower() == 'пока':
- bot.send_message(message.chat.id, 'Прощай, создатель')
- bot.polling()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement