24 lines
468 B
Python
24 lines
468 B
Python
import time
|
|
import telebot
|
|
import share_fetcher
|
|
|
|
bot = 0
|
|
|
|
@bot.message_handler(func=lambda message: True)
|
|
def send_share_price(message):
|
|
fetcher = share_fetcher.Share_Handler()
|
|
str_price = fetcher.get_share_price(str(message.text))
|
|
return str_price
|
|
|
|
|
|
def main_loop(p_bot):
|
|
|
|
""" Get Information about bot status every 3 seconds
|
|
:raises: none
|
|
|
|
:rtype: none
|
|
"""
|
|
bot = p_bot
|
|
bot.infinity_polling()
|
|
while 1:
|
|
time.sleep(3) |