Created
March 28, 2016 16:42
-
-
Save eternnoir/472749d16a1a6ec0dfc4 to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
import telebot | |
from telebot import types | |
API_TOKEN = '<api_token>' | |
bot = telebot.TeleBot(API_TOKEN) | |
# Handle '/start' and '/help' | |
@bot.message_handler(commands=['help', 'start']) | |
def send_welcome(message): | |
msg = bot.reply_to(message, """\ | |
Hi there, I am Example bot. | |
Send me location? | |
""") | |
bot.register_next_step_handler(msg, process_location_step) | |
def process_location_step(message): | |
# do something about location. | |
bot.reply(message, "result") | |
bot.polling() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment