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

enh: optimize imports

This commit is contained in:
uburuntu 2018-08-17 12:54:26 +03:00
parent feec1dde56
commit 99466017c5
12 changed files with 35 additions and 29 deletions

View File

@ -2,9 +2,10 @@
This is a detailed example using almost every command of the API
"""
import time
import telebot
from telebot import types
import time
TOKEN = '<token_string>'

View File

@ -1,8 +1,9 @@
# This example show how to write an inline mode telegramt bot use pyTelegramBotAPI.
import telebot
import time
import sys
import logging
import sys
import time
import telebot
from telebot import types
API_TOKEN = '<TOKEN>'

View File

@ -1,6 +1,5 @@
import telebot
from telebot.types import LabeledPrice
from telebot.types import ShippingOption
from telebot.types import LabeledPrice, ShippingOption
token = '1234567890:AAAABBBBCCCCDDDDeeeeFFFFgggGHHHH'
provider_token = '1234567890:TEST:AAAABBBBCCCCDDDD' # @BotFather -> Bot Settings -> Payments

View File

@ -3,9 +3,10 @@
# and goes by the name 'TeleBot (@pyTeleBot)'. Join our group to talk to him!
# WARNING: Tested with Python 2.7
import telebot
import os
import telebot
text_messages = {
'welcome':
u'Please welcome {name}!\n\n'

View File

@ -11,7 +11,6 @@ from aiohttp import web
import telebot
API_TOKEN = '<api_token>'
WEBHOOK_HOST = '<ip/host where the bot is running>'

View File

@ -4,10 +4,11 @@
# This is a simple echo bot using decorators and webhook with CherryPy
# It echoes any incoming text messages and does not use the polling method.
import cherrypy
import telebot
import logging
import cherrypy
import telebot
API_TOKEN = '<api_token>'

View File

@ -11,10 +11,10 @@ except ImportError:
# Python 3
from http.server import BaseHTTPRequestHandler, HTTPServer
import ssl
import telebot
import logging
import ssl
import telebot
API_TOKEN = '<api_token>'

View File

@ -4,11 +4,12 @@
# This is a simple echo bot using decorators and webhook with flask
# It echoes any incoming text messages and does not use the polling method.
import flask
import telebot
import logging
import time
import flask
import telebot
API_TOKEN = '<api_token>'

View File

@ -1,8 +1,9 @@
import os
import telebot
from flask import Flask, request
import telebot
TOKEN = '<api_token>'
bot = telebot.TeleBot(TOKEN)
server = Flask(__name__)

View File

@ -4,13 +4,15 @@
# This example shows webhook echo bot with Tornado web framework
# Documenation to Tornado: http://tornadoweb.org
import telebot
import tornado.web
import tornado.ioloop
import tornado.httpserver
import tornado.options
import signal
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import telebot
API_TOKEN = '<api_token>'
WEBHOOK_CERT = "./cert.pem"
WEBHOOK_PKEY = "./pkey.pem"

View File

@ -1,16 +1,15 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
import threading
import time
import re
import sys
import six
import logging
import os
import pickle
import re
import sys
import threading
import time
import logging
import six
logger = logging.getLogger('TeleBot')
formatter = logging.Formatter(

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
import random
import re
import string
import sys
import threading
import traceback
import re
import sys
import six
from six import string_types