Last active
December 28, 2016 13:41
-
-
Save iliakonnov/05e1bf2e36b77baa317604528f0fc983 to your computer and use it in GitHub Desktop.
pyTelegramBotApi test
This file contains 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
import telebot | |
bot = telebot.TeleBot("TOKEN") # This token is not valid, you should obtain your token from @BotFather bot (https://core.telegram.org/bots#botfather) | |
@bot.message_handler(commands=['start', 'help']) | |
def send_welcome(message): | |
bot.reply_to(message, "Howdy, how are you doing?") | |
@bot.message_handler(func=lambda message: True) | |
def echo_all(message): | |
bot.reply_to(message, message.text) | |
bot.polling() |
This file contains 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
import telebot | |
bot = telebot.TeleBot("279863450:AAFrWKIJbXTRGNh6apgC6a_AjCvzyRBdqJg") # I deleted the bot with this token. | |
@bot.message_handler(commands=['start', 'help']) | |
def send_welcome(message): | |
bot.reply_to(message, "Howdy, how are you doing?") | |
@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