1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Renaming back pytelegrambotapi module to telebot

This commit is contained in:
Waffle
2018-04-28 13:50:59 +03:00
parent 183230e927
commit 3ba9799b98
18 changed files with 102 additions and 102 deletions

View File

@@ -9,7 +9,7 @@ import ssl
from aiohttp import web
import pytelegrambotapi
import telebot
API_TOKEN = '<api_token>'
@@ -33,10 +33,10 @@ WEBHOOK_URL_BASE = "https://{}:{}".format(WEBHOOK_HOST, WEBHOOK_PORT)
WEBHOOK_URL_PATH = "/{}/".format(API_TOKEN)
logger = pytelegrambotapi.logger
pytelegrambotapi.logger.setLevel(logging.INFO)
logger = telebot.logger
telebot.logger.setLevel(logging.INFO)
bot = pytelegrambotapi.TeleBot(API_TOKEN)
bot = telebot.TeleBot(API_TOKEN)
app = web.Application()
@@ -45,7 +45,7 @@ app = web.Application()
async def handle(request):
if request.match_info.get('token') == bot.token:
request_body_dict = await request.json()
update = pytelegrambotapi.types.Update.de_json(request_body_dict)
update = telebot.types.Update.de_json(request_body_dict)
bot.process_new_updates([update])
return web.Response()
else: