Created
April 17, 2020 16:54
-
-
Save alages97/af3308d291551d7443e8b39dce787076 to your computer and use it in GitHub Desktop.
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
@bot.message_handler(commands=['start']) # welcome message handler | |
def send_welcome(message): | |
bot.reply_to(message, 'Hello! I am bot') | |
@bot.message_handler(commands=['help']) # help message handler | |
def send_welcome(message): | |
bot.reply_to(message, 'Help message') | |
@bot.message_handler(func=lambda message: True) # makes the bot imitate the user's message | |
def echo_all(message): | |
bot.reply_to(message, message.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment