Skip to content

Commit

Permalink
Added all icons
Browse files Browse the repository at this point in the history
close #381
  • Loading branch information
StephanAkkerman committed Nov 8, 2023
1 parent 7ae4fa6 commit 608cbbe
Show file tree
Hide file tree
Showing 28 changed files with 86 additions and 63 deletions.
Binary file added img/icons/binance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/coinbase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/coinglass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/investing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/kucoin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/nasdaqtrader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/playtoearn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/icons/playtoearn.webp
Binary file not shown.
Binary file added img/icons/reddit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/stocktwits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/tradingview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/unusualwhales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/yahoo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/cogs/loops/earnings_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Local dependencies
import util.vars
from util.vars import config
from util.vars import config, data_sources
from util.disc_util import get_channel, get_tagged_users


Expand Down Expand Up @@ -43,7 +43,7 @@ def earnings_embed(self, df: pd.DataFrame, date: str) -> tuple[str, discord.Embe
title=f"Earnings for {date}",
url=f"https://finance.yahoo.com/calendar/earnings?day={date}",
description="",
color=0x720E9E,
color=data_sources["yahoo"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand All @@ -53,7 +53,7 @@ def earnings_embed(self, df: pd.DataFrame, date: str) -> tuple[str, discord.Embe

e.set_footer(
text="\u200b",
icon_url="https://s.yimg.com/cv/apiv2/myc/finance/Finance_icon_0919_250x252.png",
icon_url=data_sources["yahoo"]["icon"],
)

tags = get_tagged_users(df["ticker"].to_list())
Expand Down
6 changes: 3 additions & 3 deletions src/cogs/loops/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import config, post_json_data
from util.vars import config, post_json_data, data_sources
from util.disc_util import get_channel


Expand Down Expand Up @@ -155,7 +155,7 @@ async def post_events(self):
title=f"Events on {date}",
url=f"https://www.investing.com/economic-calendar/",
description="",
color=0xDC8F02,
color=data_sources["investing"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand All @@ -165,7 +165,7 @@ async def post_events(self):

e.set_footer(
text="\u200b",
icon_url="https://play-lh.googleusercontent.com/fJg2QmhVNd-LGxfBzNC6NPeUFY7EjoolG89dVOJ25ieyKpn3r7_ix1q93EFxI_s0RmE",
icon_url=data_sources["investing"]["icon"],
)

await self.channel.send(embed=e)
Expand Down
6 changes: 3 additions & 3 deletions src/cogs/loops/funding.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import config, get_json_data
from util.vars import config, get_json_data, data_sources
from util.disc_util import get_channel


Expand Down Expand Up @@ -79,7 +79,7 @@ async def funding(self) -> None:
title=f"Binance Top 15 Lowest Funding Rates",
url="",
description="",
color=0xF0B90B,
color=data_sources["binance"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand All @@ -93,7 +93,7 @@ async def funding(self) -> None:
# Set datetime and icon
e.set_footer(
text=f"Next funding in {str(timeToNextFunding).split('.')[0]}",
icon_url="https://public.bnbstatic.com/20190405/eb2349c3-b2f8-4a93-a286-8f86a62ea9d8.png",
icon_url=data_sources["binance"]["icon"],
)

lowest_tickers = "\n".join(lowest["symbol"].tolist())
Expand Down
4 changes: 2 additions & 2 deletions src/cogs/loops/ideas.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# > Local dependencies
import util.vars
from util.vars import get_json_data, config
from util.vars import get_json_data, config, data_sources
from util.disc_util import get_channel, get_tagged_users
from util.db import update_db

Expand Down Expand Up @@ -267,7 +267,7 @@ async def send_embed(self, df: pd.DataFrame, type: str) -> None:

e.set_footer(
text=f"👍 {row['Likes']} | 💬 {row['Comments']}",
icon_url="https://s3.tradingview.com/userpics/6171439-Hlns_big.png",
icon_url=data_sources["tradingview"]["icon"],
)

if type == "stocks":
Expand Down
14 changes: 7 additions & 7 deletions src/cogs/loops/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import config, get_json_data
from util.vars import config, get_json_data, data_sources
from util.tv_data import tv
from util.disc_util import get_channel
from util.afterhours import afterHours
Expand Down Expand Up @@ -89,7 +89,7 @@ async def crypto(self) -> None:
e = discord.Embed(
title=f"Crypto Indices",
description="",
color=0x131722,
color=data_sources["tradingview"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand Down Expand Up @@ -151,7 +151,7 @@ async def crypto(self) -> None:

e.set_footer(
text="\u200b",
icon_url="https://s3.tradingview.com/userpics/6171439-Hlns_orig.png",
icon_url=data_sources["tradingview"]["icon"],
)

await self.crypto_channel.purge(limit=1)
Expand All @@ -174,7 +174,7 @@ async def stocks(self) -> None:
e = discord.Embed(
title=f"Stock Indices",
description="",
color=0x131722,
color=data_sources["tradingview"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand Down Expand Up @@ -225,7 +225,7 @@ async def stocks(self) -> None:

e.set_footer(
text="\u200b",
icon_url="https://s3.tradingview.com/userpics/6171439-Hlns_orig.png",
icon_url=data_sources["tradingview"]["icon"],
)

await self.stocks_channel.purge(limit=1)
Expand All @@ -248,7 +248,7 @@ async def forex(self) -> None:
e = discord.Embed(
title=f"Forex Indices",
description="",
color=0x131722,
color=data_sources["tradingview"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand Down Expand Up @@ -297,7 +297,7 @@ async def forex(self) -> None:

e.set_footer(
text="\u200b",
icon_url="https://s3.tradingview.com/userpics/6171439-Hlns_orig.png",
icon_url=data_sources["tradingview"]["icon"],
)

await self.forex_channel.purge(limit=1)
Expand Down
7 changes: 4 additions & 3 deletions src/cogs/loops/liquidations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import get_json_data
from util.vars import get_json_data, data_sources
from util.formatting import human_format
from util.vars import config
from util.disc_util import get_channel
Expand Down Expand Up @@ -156,14 +156,15 @@ async def post_liquidations(self):
e = discord.Embed(
title="Total Liquidations",
description="",
color=0x000000,
color=data_sources["coinglass"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
url="https://www.coinglass.com/LiquidationData",
)
file = discord.File(filename)
e.set_image(url=f"attachment://{filename}")
e.set_footer(
text="\u200b", icon_url="https://cdn.coinglasscdn.com/static/icon_200.png"
text="\u200b",
icon_url=data_sources["coinglass"]["icon"],
)

await self.channel.purge(limit=1)
Expand Down
14 changes: 7 additions & 7 deletions src/cogs/loops/new_listings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import config, get_json_data
from util.vars import config, get_json_data, data_sources
from util.disc_util import get_channel


Expand Down Expand Up @@ -73,16 +73,16 @@ def create_embed(self, ticker: str) -> discord.Embed:
"""

if self.exchange == "binance":
color = 0xF0B90B
icon_url = "https://public.bnbstatic.com/20190405/eb2349c3-b2f8-4a93-a286-8f86a62ea9d8.png"
color = data_sources["binance"]["color"]
icon_url = data_sources["binance"]["icon"]
url = f"https://www.{self.exchange}.com/en/trade/{ticker}"
elif self.exchange == "kucoin":
color = 0x24AE8F
icon_url = "https://yourcryptolibrary.com/wp-content/uploads/2021/12/Kucoin-exchange-logo-1.png"
color = data_sources["kucoin"]["color"]
icon_url = data_sources["kucoin"]["icon"]
url = f"https://www.{self.exchange}.com/trade/{ticker}"
else: # Coinbase
color = 0x245CFC
icon_url = "https://pbs.twimg.com/profile_images/1389350367977099264/S-pY13TJ_400x400.png"
color = data_sources["coinbase"]["color"]
icon_url = data_sources["coinbase"]["icon"]
url = f"https://www.pro.{self.exchange}.com/trade/{ticker}"

e = discord.Embed(
Expand Down
6 changes: 3 additions & 3 deletions src/cogs/loops/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import config, get_json_data
from util.vars import config, get_json_data, data_sources
from util.disc_util import get_channel, get_guild
from util.formatting import human_format

Expand Down Expand Up @@ -104,7 +104,7 @@ def make_UW_embed(self, row):
e.set_footer(
# Use the time the alert was created in the footer
text=f"Alerted at {row['alert_time']}",
icon_url="https://docs.unusualwhales.com/images/banner.png",
icon_url=data_sources["unusualwhales"]["icon"],
)

return e
Expand Down Expand Up @@ -178,7 +178,7 @@ async def shorts(self):
e.set_footer(
# Use the time the alert was created in the footer
text="\u200b",
icon_url="https://docs.unusualwhales.com/images/banner.png",
icon_url=data_sources["unusualwhales"]["icon"],
)

e.add_field(name="Symbol", value=symbols, inline=True)
Expand Down
12 changes: 6 additions & 6 deletions src/cogs/loops/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Local dependencies
import util.vars
from util.vars import config
from util.vars import config, data_sources
from util.disc_util import get_channel, get_webhook
from util.db import update_db

Expand Down Expand Up @@ -147,21 +147,21 @@ async def wsb(self, reddit: asyncpraw.Reddit) -> None:
title=title,
url="https://www.reddit.com" + submission.permalink,
description=descr,
color=0xFF3F18,
color=data_sources["reddit"]["color"],
timestamp=datetime.datetime.utcfromtimestamp(
submission.created_utc
),
)
if img_url:
e.set_image(url=img_url[0])

e.set_thumbnail(
url="https://styles.redditmedia.com/t5_2th52/styles/communityIcon_wzrl8s0hx8a81.png?width=256&s=dcbf830170c1e8237335a3f046b36f723c5d55e7"
)
# e.set_thumbnail(
# url="https://styles.redditmedia.com/t5_2th52/styles/communityIcon_wzrl8s0hx8a81.png?width=256&s=dcbf830170c1e8237335a3f046b36f723c5d55e7"
# )

e.set_footer(
text=f"🔼 {submission.score} | 💬 {submission.num_comments}",
icon_url="https://external-preview.redd.it/iDdntscPf-nfWKqzHRGFmhVxZm4hZgaKe5oyFws-yzA.png?width=640&crop=smart&auto=webp&s=bfd318557bf2a5b3602367c9c4d9cd84d917ccd5",
icon_url=data_sources["reddit"]["icon"],
)

if len(img_url) > 1:
Expand Down
6 changes: 3 additions & 3 deletions src/cogs/loops/stock_halts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import config, post_json_data
from util.vars import config, post_json_data, data_sources
from util.disc_util import get_channel, get_tagged_users
from util.afterhours import afterHours

Expand Down Expand Up @@ -43,7 +43,7 @@ async def halt_embed(self):
title=f"Halted Stocks",
url="https://www.nasdaqtrader.com/trader.aspx?id=tradehalts",
description="",
color=0x0996C7,
color=data_sources["nasdaqtrader"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand All @@ -61,7 +61,7 @@ async def halt_embed(self):

e.set_footer(
text="\u200b",
icon_url="https://s3-symbol-logo.tradingview.com/nasdaq--600.png",
icon_url=data_sources["nasdaqtrader"]["icon"],
)

tags = get_tagged_users(df["Issue Symbol"].to_list())
Expand Down
6 changes: 3 additions & 3 deletions src/cogs/loops/stocktwits.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from discord.ext.tasks import loop

# Local dependencies
from util.vars import config, get_json_data
from util.vars import config, get_json_data, data_sources
from util.disc_util import get_channel


Expand Down Expand Up @@ -113,7 +113,7 @@ async def stocktwits(self) -> None:
title=f"StockTwits Rankings",
url="https://stocktwits.com/rankings/trending",
description="",
color=0xFFFFFF,
color=data_sources["stocktwits"]["color"],
timestamp=datetime.datetime.now(datetime.timezone.utc),
)

Expand All @@ -124,7 +124,7 @@ async def stocktwits(self) -> None:
# Set datetime and icon
e.set_footer(
text="\u200b",
icon_url="https://miro.medium.com/max/400/1*Jp-O_IoMusXAlj1-KrYmrw.jpeg",
icon_url=data_sources["stocktwits"]["icon"],
)

await self.channel.send(embed=e)
Expand Down
Loading

0 comments on commit 608cbbe

Please sign in to comment.