Merge pull request #189 from WebEngineering2/bot
Removed all hard coded links
This commit was merged in pull request #189.
This commit is contained in:
@@ -46,7 +46,7 @@ def start_updater():
|
||||
|
||||
print("Bot updates started")
|
||||
|
||||
my_handler = API_Handler("https://gruppe1.testsites.info/api", str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD")))
|
||||
my_handler = API_Handler(os.getenv("API_URL"), str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD")))
|
||||
|
||||
update_crontab(my_handler)
|
||||
|
||||
@@ -150,7 +150,7 @@ def update_for_user(p_user_id, p_my_handler):
|
||||
my_update_message = f'{share_fetcher.get_share_information_markdown(share_symbols[i])}\ncount: {hf.make_markdown_proof(share_amounts[i])}\nTotal: {hf.make_markdown_proof(round(float(my_price) * float(share_amounts[i]), 2))} EUR'
|
||||
bot.send_message(chat_id=p_user_id, text=my_update_message, parse_mode="MARKDOWNV2")
|
||||
else:
|
||||
send_to_user("No shares found for your account. Check https://gruppe1.testsites.info to change your settings and add shares.", pUser_id=p_user_id)
|
||||
send_to_user("No shares found for your account. Check " + os.getenv("WEBSITE_URL") + " to change your settings and add shares.", pUser_id=p_user_id)
|
||||
|
||||
if len(shares) != 0: # Send updates on watchlist shares if existing
|
||||
send_to_user("Your watchlist shares:", pUser_id=p_user_id)
|
||||
|
||||
Reference in New Issue
Block a user