fix link to coin price in stock function

This commit is contained in:
Luke Robles 2022-05-10 15:05:39 -07:00
parent 5d6188880a
commit d95f8b566a
3 changed files with 6 additions and 2 deletions

0
app/bot.py Normal file → Executable file
View File

6
app/stock.py Executable file → Normal file
View File

@ -133,9 +133,13 @@ def get_stock(share_name, verbose=False):
if verbose: if verbose:
embed = _add_verbose_fields(embed, request) 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( embed.add_field(
name="Link to stock price", name="Link to stock price",
value="https://www.marketwatch.com/investing/stock/%s" % share_name, value="%s/%s" % (chart_url, share_name),
inline=False, inline=False,
) )
embed.set_footer( embed.set_footer(

View File

@ -6,7 +6,7 @@ replicaCount: 1
image: image:
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "189" tag: "191"
repository: ldooks/dragon-bot repository: ldooks/dragon-bot
pullPolicy: IfNotPresent pullPolicy: IfNotPresent