1
0
mirror of https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git synced 2025-06-16 06:56:46 +00:00

Close #43 That was surprisingly painless...

This commit is contained in:
Anson Biggs 2021-02-05 18:45:09 -07:00
parent 1e60528a08
commit 3c9e1200d4
2 changed files with 7 additions and 5 deletions

10
bot.py
View File

@ -66,7 +66,9 @@ def status(update, context):
message = ""
try:
# Bot Status
bot_resp = datetime.datetime.utcnow() - update.message.date
bot_resp = (
datetime.datetime.now(update.message.date.tzinfo) - update.message.date
)
message += f"It took {bot_resp.total_seconds()} seconds for the bot to get your message.\n"
# IEX Status
@ -401,7 +403,7 @@ def error(update, context):
def main():
"""Start the context.bot."""
# Create the EventHandler and pass it your bot's token.
updater = Updater(TELEGRAM_TOKEN, use_context=True)
updater = Updater(TELEGRAM_TOKEN)
# Get the dispatcher to register handlers
dp = updater.dispatcher
@ -418,8 +420,8 @@ def main():
dp.add_handler(CommandHandler("stats", stat))
dp.add_handler(CommandHandler("search", search))
dp.add_handler(CommandHandler("intraday", intra))
dp.add_handler(CommandHandler("intra", intra))
dp.add_handler(CommandHandler("chart", chart))
dp.add_handler(CommandHandler("intra", intra, run_async=True))
dp.add_handler(CommandHandler("chart", chart, run_async=True))
dp.add_handler(CommandHandler("crypto", crypto))
dp.add_handler(CommandHandler("random", rand_pick))
dp.add_handler(CommandHandler("donate", donate))

View File

@ -1,4 +1,4 @@
python-telegram-bot==12.5.1
python-telegram-bot==13.2
requests==2.25.1
pandas==1.2.1
fuzzywuzzy==0.18.0