-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsave.py
73 lines (73 loc) · 4.37 KB
/
save.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# # #
# # # @client.tree.command()
# # # @app_commands.describe(
# # # coin_name='The first value you want to add something to',
# # # )
# # # async def coin(interaction: discord.Interaction, coin_name: str):
# # # resp = requests.get(cfg["atom_coin_url"])
# # # body = resp.json()
# # # embed = discord.Embed(
# # # color=discord.Color.purple(),
# # # )
# # # logging.info(body)
# # # embed.set_author(name=coin_name, url=cfg["atom_geko_url"], icon_url=body["image"]["thumb"])
# # # embed.add_field(name="market_cap_rank", value="{}".format(body["market_cap_rank"]), inline=True)
# # # embed.add_field(name="current_price",
# # # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["current_price"]["usd"]),
# # # humanize.intcomma(body["market_data"]["current_price"]["eur"])), inline=True)
# # # embed.add_field(name="ath",
# # # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["ath"]["usd"]),
# # # humanize.intcomma(body["market_data"]["ath"]["eur"])), inline=True)
# # # embed.add_field(name="market_cap",
# # # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["market_cap"]["usd"]),
# # # humanize.intcomma(body["market_data"]["market_cap"]["eur"])), inline=True)
# # # embed.add_field(name="total_volume",
# # # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["total_volume"]["usd"]),
# # # humanize.intcomma(body["market_data"]["total_volume"]["eur"])), inline=True)
# # #
# # # await interaction.response.send_message(embed=embed,)
# #
# #
# # @client.tree.command(name="atom", description="Display Atom Info")
# # async def atom(interaction):
# # resp = requests.get(cfg["atom_coin_url"])
# # body = resp.json()
# # embed = discord.Embed(
# # color=discord.Color.purple(),
# # )
# # logging.info(body)
# # embed.set_author(name="Atom", url=cfg["atom_geko_url"], icon_url=body["image"]["thumb"])
# # embed.add_field(name="market_cap_rank", value="{}".format(body["market_cap_rank"]), inline=True)
# # embed.add_field(name="current_price",
# # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["current_price"]["usd"]),
# # humanize.intcomma(body["market_data"]["current_price"]["eur"])), inline=True)
# # embed.add_field(name="ath",
# # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["ath"]["usd"]),
# # humanize.intcomma(body["market_data"]["ath"]["eur"])), inline=True)
# # embed.add_field(name="market_cap",
# # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["market_cap"]["usd"]),
# # humanize.intcomma(body["market_data"]["market_cap"]["eur"])), inline=True)
# # embed.add_field(name="total_volume",
# # value="{} $ | {} €".format(humanize.intcomma(body["market_data"]["total_volume"]["usd"]),
# # humanize.intcomma(body["market_data"]["total_volume"]["eur"])), inline=True)
# #
# # await interaction.response.send_message(embed=embed,)
#
# @client.tree.command(name="binance", description="Display Binance Exchange Url")
# async def binance(interaction):
# file = discord.File("assets/binance.png", filename="image.png")
# embed = discord.Embed(
# color=discord.Color.yellow(),
# )
# embed.set_author(name="Binance", url=cfg["binance_url"], icon_url="attachment://image.png")
# await interaction.response.send_message(embed=embed, file=file,)
#
#
# @client.tree.command(name="kucoin", description="Display Kucoin Exchange Url")
# async def kucoin(interaction):
# file = discord.File("assets/kucoin.png", filename="image.png")
# embed = discord.Embed(
# color=discord.Color.green(),
# )
# embed.set_author(name="Kucoin", url=cfg["kucoin_url"], icon_url="attachment://image.png")
# await interaction.response.send_message(embed=embed, file=file,)