forked from strelka-ai/workshop_health_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tg.py
26 lines (16 loc) · 762 Bytes
/
tg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import telebot
token = '723314573:AAH5-onyzwyA1fMDnk73GLBQ7sE2a2j_qD4'
bot = telebot.TeleBot(token=token)
@bot.message_handler(commands=['start', 'help', 'vasya'])
def send_welcome(message):
bot.reply_to(message, "Hello papagena! Tu le bella comme le papaya!")
@bot.message_handler(func=lambda m: True)
def echo_all(message):
if message.text == 'banana':
bot.reply_to(message, 'BBANANAAA!!!1')
else:
bot.send_message(message.chat.id, message.text)
print('Start pooling...')
bot.polling()
# https://api.telegram.org/bot723314573:AAH5-onyzwyA1fMDnk73GLBQ7sE2a2j_qD4/getUpdates
# https://api.telegram.org/bot723314573:AAH5-onyzwyA1fMDnk73GLBQ7sE2a2j_qD4/sendMessage?chat_id=53935227&text=test_message