Skip to content

[NBA]: New commands and more - #227

Closed
Evanroby wants to merge 5 commits into
ltzmax:masterfrom
Evanroby:nba
Closed

[NBA]: New commands and more#227
Evanroby wants to merge 5 commits into
ltzmax:masterfrom
Evanroby:nba

Conversation

@Evanroby

Copy link
Copy Markdown
Contributor

GLOBAL

Use async with ctx.typing() instead of await ctx.typing() on all cogs required to do change to avoid bot being in a typing loop.

NBA cog:

New commands added:
[p]nba standings [east|west] - LeagueStandingsV3 from CDN
[p]nba leaders [pts|reb|ast|stl|blk] - LeagueDashPlayerStats
[p]nba player <name> - PlayerCareerStats + CommonPlayerInfo
[p]nba roster <team> - CommonTeamRoster
[p]nba teamstats <team> - LeagueDashTeamStats

New formatter functions for each command

@ltzmax ltzmax left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, did you test the commands? I don't see the imports from nba api library added here at all, they're pointed on different imports though, the ones I use is different endpoints

Comment thread nba/formatters.py Outdated
color=0xEE6730,
)
embed.add_field(name="🏟️ Arena", value=location or "Unknown", inline=False)
if broadcast_str:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally removed this, I didn't like this information really, it didn't display anything useful.

if code == 404:
return await ctx.send(f"No Pokémon found for `{pokemon}`.")
return await ctx.send("Could not fetch Pokémon data. Please try again later.")
async with ctx.typing():

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be await ctx.typing. the one you're using isn't actually used anymore.

@Evanroby

Copy link
Copy Markdown
Contributor Author

I can't get it to work, I'm trying a lot of stuffs for 20 mins and can't get anything to work, I'll let you do it. Might re-open one later on for the typing part

@Evanroby Evanroby closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants