mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fixing and upgrading next step and reply handlers. + minor fixes
Rename telebot package to pytelegrambotapi becouse lib named telebot exists and it raising many errors Add methods: | register_for_reply_by_message_id, | register_next_step_handler_by_chat_id, | clear_reply_handlers, | clear_reply_handlers_by_message_id
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import os
|
||||
|
||||
import telebot
|
||||
import pytelegrambotapi
|
||||
from flask import Flask, request
|
||||
|
||||
TOKEN = '<api_token>'
|
||||
bot = telebot.TeleBot(TOKEN)
|
||||
bot = pytelegrambotapi.TeleBot(TOKEN)
|
||||
server = Flask(__name__)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ def echo_message(message):
|
||||
|
||||
@server.route('/' + TOKEN, methods=['POST'])
|
||||
def getMessage():
|
||||
bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))])
|
||||
bot.process_new_updates([pytelegrambotapi.types.Update.de_json(request.stream.read().decode("utf-8"))])
|
||||
return "!", 200
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user