Skip to content

Commit

Permalink
fixed nft api
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanAkkerman committed Mar 30, 2024
1 parent c818c46 commit cb6b889
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cogs/loops/nfts.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ async def upcoming_nfts(self):
)

e.add_field(
name="Start Time",
value="\n".join(upcoming["start_time"].astype(str).tolist()),
name="Drop Type",
value="\n".join(upcoming["dropType"].tolist()),
inline=True,
)
e.set_footer(text="\u200b", icon_url=data_sources["coinmarketcap"]["icon"])
Expand Down Expand Up @@ -411,17 +411,17 @@ async def upcoming_cmc():
# name, websiteUrl, price, dropDate
# Filter out the columns that actually exist in the DataFrame
existing_columns = [
col for col in ["name", "websiteUrl", "price", "dropDate"] if col in df.columns
col for col in ["name", "websiteUrl", "price", "dropType"] if col in df.columns
]

# Use only the existing columns to filter the DataFrame
df = df[existing_columns]

# Use same method as #events channel time
# Rename to start_time
df["start_time"] = df["dropDate"].apply(
lambda x: f"<t:{int(x/1000)}:d>" if pd.notnull(x) else ""
)
# df["start_time"] = df["dropDate"].apply(
# lambda x: f"<t:{int(x/1000)}:d>" if pd.notnull(x) else ""
# )

# Conditionally concatenate "name" and "website" only when "website" is not NaN
df["symbol"] = np.where(
Expand Down

0 comments on commit cb6b889

Please sign in to comment.