- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
Latest commit
16 lines (11 loc) · 439 Bytes
/
Copy pathbot.py
File metadata and controls
16 lines (11 loc) · 439 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
importconfig
importtelebot
bot=telebot.TeleBot(config.token)
@bot.message_handler(commands=["hello"])
defwelcome(message):
bot.send_message(message.chat.id, "Здравствуйте, {0.first_name}!".format(message.from_user))
@bot.message_handler(content_types=["text"])
defrepeat_all_messages(message):
bot.send_message(message.chat.id, message.text)
if__name__=='__main__':
bot.infinity_polling()