Skip to content

Commit 2a115ca

Browse files
committed
Test with fetch_bits_leaderboard
1 parent 2a3097e commit 2a115ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

twitchio/user.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from .exceptions import HTTPException
3131
from .models.ads import AdSchedule, CommercialStart, SnoozeAd
3232
from .models.raids import Raid
33-
from .utils import parse_timestamp
33+
from .utils import handle_user_ids, parse_timestamp
3434

3535

3636
if TYPE_CHECKING:
@@ -309,13 +309,14 @@ def fetch_game_analytics(
309309
max_results=max_results,
310310
)
311311

312+
@handle_user_ids(is_self=True)
312313
async def fetch_bits_leaderboard(
313314
self,
314-
token_for: str,
315+
token_for: str | PartialUser,
315316
count: int = 10,
316317
period: Literal["all", "day", "week", "month", "year"] = "all",
317318
started_at: datetime.datetime | None = None,
318-
user_id: str | int | None = None,
319+
user_id: str | int | PartialUser | None = None,
319320
) -> BitsLeaderboard:
320321
"""Fetches the Bits leaderboard for this user.
321322

0 commit comments

Comments
 (0)