From 8068f7e82cb775bb602b107666d7bd9d2b7239f5 Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Tue, 10 May 2022 15:05:39 -0700 Subject: [PATCH] fix link to coin price in stock function --- app/bot.py | 0 app/stock.py | 6 +++++- helm/values.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 app/bot.py mode change 100755 => 100644 app/stock.py diff --git a/app/bot.py b/app/bot.py old mode 100644 new mode 100755 diff --git a/app/stock.py b/app/stock.py old mode 100755 new mode 100644 index 6dde77c0..a7174406 --- a/app/stock.py +++ b/app/stock.py @@ -133,9 +133,13 @@ def get_stock(share_name, verbose=False): if verbose: embed = _add_verbose_fields(embed, request) + chart_url = "https://www.marketwatch.com/investing/stock" + if "-" in share_name: + chart_url = "https://coinmarketcap.com/currencies" + share_name = request["shortName"].split()[0].lower() embed.add_field( name="Link to stock price", - value="https://www.marketwatch.com/investing/stock/%s" % share_name, + value="%s/%s" % (chart_url, share_name), inline=False, ) embed.set_footer( diff --git a/helm/values.yaml b/helm/values.yaml index e1a5b7c5..03aa92b5 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: # Overrides the image tag whose default is the chart appVersion. - tag: "189" + tag: "191" repository: ldooks/dragon-bot pullPolicy: IfNotPresent