Created
March 7, 2018 07:42
-
-
Save kevsersrca/78c6bb60882f6b4d73b197b818504695 to your computer and use it in GitHub Desktop.
telebot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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