mirror of
https://github.com/andwati/unsplash-bot.git
synced 2026-10-26 06:12:15 +00:00
18 lines
348 B
Python
18 lines
348 B
Python
import telebot
|
|
from config import TELEGRAM_TOKEN
|
|
|
|
bot = telebot.TeleBot(TELEGRAM_TOKEN)
|
|
|
|
|
|
@bot.message_handler(commands=["start", "hello"])
|
|
def send_welcome(message):
|
|
bot.reply_to(message, "Hello, I'm a bot!")
|
|
|
|
|
|
@bot.message_handler(func=lambda msg: True)
|
|
def echo_all(message):
|
|
bot.reply_to(message, message.text)
|
|
|
|
|
|
bot.infinity_polling()
|