Skip to content

Instantly share code, notes, and snippets.

@eternnoir
Created March 28, 2016 16:42
Show Gist options
  • Save eternnoir/472749d16a1a6ec0dfc4 to your computer and use it in GitHub Desktop.
Save eternnoir/472749d16a1a6ec0dfc4 to your computer and use it in GitHub Desktop.
# -*- 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