Reputation:
My python telegram bot code is
import telebot, os
from telebot import types
# from telebot import
from settings import TOKEN
import requests
#from pyTelegramBotAPI import users
from pyzbar.pyzbar import decode
from PIL import Image
import sqlite3
import json
bot = telebot.TeleBot(TOKEN)
@bot.message_handler(commands=['start'])
def send_welcome(message):
markup = types.ReplyKeyboardMarkup()
markup.add(types.KeyboardButton(text="Дати доступ до гуолокації.", request_location=True))
bot.send_message(message.chat.id, "Нам потрібена ваша геолокація", reply_markup=markup)
bot.polling()
And Proc file is web: python bot.py
When I run it local bot is working, after deploy bot send nothing to user
Upvotes: 0
Views: 401
Reputation: 895
You have to upload 3 files to Heroku:
Proc
web: python bot.py
requirements.txt
pyTelegramBotAPI==3.6.6
heroku==0.1.4
+ other moduls
runtime.txt
python-3.7.0
or other python version
And I recommend to replaсe bot.polling()
with bot.infinity_polling(True)
Upvotes: 1