setup basic bot

This commit is contained in:
2023-09-27 02:01:35 +03:00
parent 3fcf76ceaa
commit 534dd0206f
5 changed files with 390 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
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()