Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kevsersrca/78c6bb60882f6b4d73b197b818504695 to your computer and use it in GitHub Desktop.
Save kevsersrca/78c6bb60882f6b4d73b197b818504695 to your computer and use it in GitHub Desktop.
telebot
# pip install pytelegrambotapi --upgrade
import telebot
bot = telebot.TeleBot("")
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
if message.chat.type == "private":
bot.reply_to(message, str(bot.get_me()))
if message.chat.type == "channel":
bot.reply_to(message, "test3")
@bot.message_handler(func=lambda message: True)
def echo_all(message):
bot.reply_to(message, message.text)
bot.polling()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment